]> sourceware.org Git - lvm2.git/commit
metadata: fix segfault when filters reject devices
authorDavid Teigland <teigland@redhat.com>
Wed, 27 Apr 2016 17:13:26 +0000 (12:13 -0500)
committerDavid Teigland <teigland@redhat.com>
Wed, 27 Apr 2016 17:13:26 +0000 (12:13 -0500)
commit3c53acb378478f23acf624be8836c0cb24c2724e
tree9a232dff7b31e409744329606ab38d04c4cce3bb
parent49f32e4859017104555ba0297fa0384d4aa3d5f2
metadata: fix segfault when filters reject devices

Checking for devices uses is_missing_pv() to check
if there is a device for the PV.  is_missing_pv()
is based on the MISSING_PV flag, which does not
always correspond to !pv->dev.  When using lvmetad,
a command like:

pvs --config 'devices/filter=["a|/dev/sdb|", "r|.*|"]'

will cause a number of PVs to have NULL pv->dev, but
not the MISSING_PV flag.  So, NULL pv->dev needs to
also be checked.
lib/metadata/metadata.c
This page took 1.894822 seconds and 5 git commands to generate.