1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/filters
David Teigland b5b0369e4d filter-sysfs: skip when device id is set
When a device id is set for a device, using an idtype other
than devname, it means that sysfs has been used with the device
to match the device id.  So, checking for a sysfs entry for the
device in filter-sysfs is redundant.  For any other cases not
covered by this (e.g. devname ids), have filter-sysfs simply
stat /sys/dev/block/major:minor to test if the device exists
in sysfs.

The extensive processing done by filter-sysfs init is removed.
It was taking an immense amount of time with many devices, e.g.
. 1024 PVs in 520 VGs
. 520 concurrent vgchange -ay <vgname> commands
. vgchange scans only PVs in the named VG (based on pvs_online
  files from a pending patch)

A large number of the vgchange commands were taking over 1 min,
and nearly half of that time was used by filter-sysfs init.
With this patch, the vgchange commands take about half the time.
2021-11-02 16:54:53 -05:00
..
filter-composite.c devices: rework libudev usage 2021-07-13 11:11:23 -05:00
filter-deviceid.c device usage based on devices file 2021-02-23 16:43:32 -06:00
filter-fwraid.c filters: nodata option 2020-10-21 16:24:16 -05:00
filter-internal.c devices: support printing the filter that rejects a device 2020-10-01 12:00:09 -05:00
filter-md.c devices: rework libudev usage 2021-07-13 11:11:23 -05:00
filter-mpath.c filters: fix memleak on mpath filter destroy 2021-09-13 12:34:41 +02:00
filter-partitioned.c devices: rework libudev usage 2021-07-13 11:11:23 -05:00
filter-persistent.c debug: reduce some debugging noise 2021-10-14 23:34:11 +02:00
filter-regex.c devices file: recommend removing filter 2021-05-05 13:59:42 -05:00
filter-signature.c filters: nodata option 2020-10-21 16:24:16 -05:00
filter-sysfs.c filter-sysfs: skip when device id is set 2021-11-02 16:54:53 -05:00
filter-type.c devices: support printing the filter that rejects a device 2020-10-01 12:00:09 -05:00
filter-usable.c filter-usable: remove udev dev size check 2021-07-13 11:11:23 -05:00
filter.h devices: rework libudev usage 2021-07-13 11:11:23 -05:00