]> sourceware.org Git - lvm2.git/commit
filters: partitioned: fix partition table filter with external_device_info_source...
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 2 Feb 2016 12:28:11 +0000 (13:28 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Tue, 2 Feb 2016 12:28:11 +0000 (13:28 +0100)
commitec43f55445966b5075fa8083921d182a0a138326
treebe65cc4479a0bc5f50cfad78104e9550526b3681
parent762b0d697ff7456d0a450121e41eff00cd5a7f08
filters: partitioned: fix partition table filter with external_device_info_source="udev" and blkid<2.20

Non-dm devices have ID_PART_TABLE_TYPE variable exported in
udev db from blkid scan for *both* whole devices and partitions.
We used ID_PART_ENTRY_DISK in addition to decide whether this
is the whole device or partition and then we filtered out only
whole devices where the partition table really is.

However, ID_PART_ENTRY_DISK was added in blkid 2.20 so we need
to use a different set of variables to decide on whole devices
and partitions on systems where older blkid is still used.

Now, we use ID_PART_TABLE_TYPE to detect that there's something
related to partitioning with this device and we use DEVTYPE variable
instead to decide between whole device (DEVTYPE="disk") and partition
(DEVTYPE="partition").

For dm devices it's simpler, we have ID_PART_TABLE_TYPE variable\
set in udev db for whole devices. It's not set for partitions,
hence we don't need more variable in addition to make the decision
on whole device vs. partition (dm devices do not have regular
partitions, hence DEVTYPE can't be used anyway, it's always set
to "disk" for whole disks and partitions).
WHATS_NEW
lib/device/dev-ext-udev-constants.h
lib/device/dev-type.c
This page took 0.040214 seconds and 5 git commands to generate.