1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/device
Peter Rajnoha ed002ed22a dev: also count with suffixes in UUID for LVs when constructing VGID and LVID index
UUID for LV is either "LVM-<vg_uuid><lv_uuid>" or "LVM-<vg_uuid><lv_uuid>-<suffix>".
The code before just checked the length of the UUID based on the first
template, not the variant with suffix - so LVs with this suffix were not
processed properly.

For example a thin pool LV (as an example of an LV that contains
sub LVs where UUIDs have suffixes):

[0] fedora/~ # lsblk -s /dev/vg/lvol1
NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vg-lvol1          253:8    0    4M  0 lvm
`-vg-pool-tpool   253:6    0  116M  0 lvm
  |-vg-pool_tmeta 253:2    0    4M  0 lvm
  | `-sda           8:0    0  128M  0 disk
  `-vg-pool_tdata 253:3    0  116M  0 lvm
    `-sda           8:0    0  128M  0 disk

Before this patch (spurious warning message about device mismatch):

[0] fedora/~ # pvs
  WARNING: Device mismatch detected for vg/lvol1 which is accessing /dev/mapper/vg-pool-tpool instead of (null).
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda   vg     lvm2 a--  124.00m    0

With this patch applied (no spurious warning message about device mismatch):

[0] fedora/~ # pvs
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda   vg     lvm2 a--  124.00m    0
2016-03-22 10:52:24 +01:00
..
dev-cache.c dev: also count with suffixes in UUID for LVs when constructing VGID and LVID index 2016-03-22 10:52:24 +01:00
dev-cache.h dev: detect mismatch between devices used and devices assumed for an LV 2016-03-21 11:40:40 +01:00
dev-dasd.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-ext-udev-constants.h filters: partitioned: fix partition table filter with external_device_info_source="udev" and blkid<2.20 2016-02-02 13:28:11 +01:00
dev-ext.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-io.c device: add DEV_OPEN_FAILURE flag 2016-03-21 11:06:05 +01:00
dev-luks.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-md.c gcc: logical-op warning go away 2016-02-23 14:41:24 +01:00
dev-swap.c doc: change fsf address 2016-01-21 12:11:37 +01:00
dev-type.c pre-release 2016-03-11 00:19:16 +00:00
dev-type.h cleanup: use braces around macro params 2016-02-23 21:40:17 +01:00
device-types.h doc: change fsf address 2016-01-21 12:11:37 +01:00
device.h dev: detect mismatch between devices used and devices assumed for an LV 2016-03-21 11:40:40 +01:00