1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/device
David Teigland 92e1422707 process_each_pv: do full scan earlier to find new devices
Before commit c1f246fedf,
_get_all_devices() did a full device scan before
get_vgnameids() was called.  The full scan in
_get_all_devices() is from calling dev_iter_create(f, 1).
The '1' arg forces a full scan.

By doing a full scan in _get_all_devices(), new devices
were added to dev-cache before get_vgnameids() began
scanning labels.  So, labels would be read from new devices.
(e.g. by the first 'pvs' command after the new device appeared.)

After that commit, _get_all_devices() was called
after get_vgnameids() was finished scanning labels.
So, new devices would be missed while scanning labels.
When _get_all_devices() saw the new devices (after
labels were scanned), those devices were added to
the .cache file.  This meant that the second 'pvs'
command would see the devices because they would be
in .cache.

Now, the full device scan is factored out of
_get_all_devices() and called by itself at the
start of the command so that new devices will
be known before get_vgnameids() scans labels.
2015-12-14 10:02:29 -06:00
..
dev-cache.c process_each_pv: do full scan earlier to find new devices 2015-12-14 10:02:29 -06:00
dev-cache.h process_each_pv: do full scan earlier to find new devices 2015-12-14 10:02:29 -06:00
dev-dasd.c device: Tidy DASD CDL format detection code. 2015-10-27 15:27:52 +00:00
dev-ext-udev-constants.h cleanup: add dev-ext-udev-constants.h with constants/names of the properties/values used from udev db 2015-01-30 13:17:12 +01:00
dev-ext.c configure: check for udev_device_get_is_initialized is available 2015-11-11 15:15:50 +01:00
dev-io.c device: Don't try to close config file on failure. 2015-08-17 12:57:01 +01:00
dev-luks.c device: cleanup signature wiping functions 2013-11-27 12:56:58 +01:00
dev-md.c cleanup: add dev-ext-udev-constants.h with constants/names of the properties/values used from udev db 2015-01-30 13:17:12 +01:00
dev-swap.c dev-swap: use SECTOR_SHIFT 2014-03-22 20:43:05 +01:00
dev-type.c dev-type: fix TOCTOU order 2015-11-09 10:19:20 +01:00
dev-type.h pvcreate: don't support unpartitioned DASD devices with CDL formatted 2015-10-27 11:42:47 +01:00
device-types.h cleanup: reorder commonly available devs in system to the front 2014-02-24 21:13:35 +01:00
device.h cleanup: keep using enum typedef 2015-11-09 10:22:52 +01:00