1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha 9738a02d3d filter-mpath: fix primary device lookup failure for partition when processing mpath filter
If using persistent filter and we're refreshing filters (just like we
do for pvcreate now after commit 54685c20fc),
we can't rely on getting the primary device of the partition from the cache
as such device could be already filtered by persistent filter and we get
a device cache lookup failure for such device.

For example:

$ lvm dumpconfig --type diff
devices {
	obtain_device_list_from_udev=0
}

$lsblk /dev/sda
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  128M  0 disk
`-sda1   8:1    0  127M  0 part

$cat /etc/lvm/cache/.cache | grep sda
		"/dev/sda1",

$pvcreate /dev/sda1
  dev_is_mpath: failed to get device for 8:1
  Physical volume "/dev/sda1" successfully created

The problematic part of the code called dev_cache_get_by_devt
to get the device for the device number supplied. Then the code
used dev_name(dev) to get the name which is then used in check
whether there's any mpath on top of this dev...

This patch uses sysfs to get the base name for the partition
instead, hence avoiding the device cache which is a correct
approach here.
2014-08-08 10:49:19 +02:00
..
activate activation: Fix upgrades using uuid suffixes. 2014-07-30 21:55:11 +01:00
cache cleanup: just safely copy string 2014-07-04 12:31:17 +02:00
cache_segtype cache: use get_cache_mode for validation 2014-07-17 16:16:45 +02:00
commands conf: add report/list_item_separator lvm.conf option 2014-07-10 16:18:45 +02:00
config thin and cache: unify pool common code 2014-07-22 22:41:38 +02:00
datastruct report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
device dev-type: print aborting log_error 2014-07-04 12:31:17 +02:00
display prompt: display 'n' for EOF 2014-07-11 12:47:41 +02:00
error cleanup: modules_needed only for devmapper 2014-04-30 10:26:30 +02:00
filters filter-mpath: fix primary device lookup failure for partition when processing mpath filter 2014-08-08 10:49:19 +02:00
format1 metadata: fix ALLOCATABLE_PV for lvm1 format 2014-07-11 12:24:15 +02:00
format_pool pvscan: use format feature flags in lvmetad code 2014-01-08 02:13:13 +00:00
format_text metadata: Reinstate system info in metadata. 2014-07-21 15:54:20 +01:00
freeseg cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
label cleanup: remove unneeded header files 2014-02-11 19:00:06 +01:00
locking locking: fix cluster locking 2014-06-20 16:38:48 +01:00
log report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
metadata activation: if LV inactive and non-clustered, do not issue "Cannot deactivate" on -aln 2014-08-07 16:44:09 +02:00
mirror report: select: refactor: move percent handling code to libdm for reuse 2014-06-17 16:27:21 +02:00
misc activation: Fix upgrades using uuid suffixes. 2014-07-30 21:55:11 +01:00
mm memlock: skip more entries 2014-06-20 11:13:41 +02:00
properties report: add separate fields for PV/VG/LV attributes 2014-07-04 15:40:17 +02:00
raid raid: support lvdisplay --maps 2014-07-17 16:18:34 +02:00
replicator compilation: fix warnings: build_dm_uuid now accepts whole struct logical_volume, not lvid 2014-06-18 14:43:13 +02:00
report report: Remove lv_volume_type field. 2014-08-05 02:04:16 +01:00
snapshot report: select: refactor: move percent handling code to libdm for reuse 2014-06-17 16:27:21 +02:00
striped metadata: use outfc for comments 2014-07-17 16:17:44 +02:00
thin report: select: refactor: move percent handling code to libdm for reuse 2014-06-17 16:27:21 +02:00
unknown unknown: add_target_line is not needed 2014-04-30 10:26:30 +02:00
uuid cleanup: drop unused define 2014-03-12 19:12:34 +01:00
zero cleanup: modules_needed only for devmapper 2014-04-30 10:26:30 +02:00
Makefile.in locking: Separate out flock and signal code. 2014-05-01 17:37:14 +01:00