master - scan: refresh paths and retry open
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=28c8e95d197bf512a39b561281162ff4d93a598e Commit: 28c8e95d197bf512a39b561281162ff4d93a598e Parent: 9a730233c935085ec5de9440796daa0d416ba4ba Author: David Teigland <[email protected]> AuthorDate: Fri May 25 11:14:12 2018 -0500 Committer: David Teigland <[email protected]> CommitterDate: Fri May 25 13:09:07 2018 -0500
scan: refresh paths and retry open
If scanning fails to open any devices, refresh the device paths in dev cache, and retry the opens.
--- lib/device/dev-cache.c | 2 + lib/label/label.c | 115 +++++++++++++++++++++++++++++++--- test/shell/pvcreate-operation-md.sh | 6 ++ 3 files changed, 112 insertions(+), 11 deletions(-)
lib/device/dev-cache.c +2 -0
@@ -1079,6 +1079,8 @@ static int _insert(const char *path, const struct stat *info,void dev_cache_scan (void ) {struct dir_list *dl; + +log_debug_devs ("Creating list of system devices." ); _cache.has_scanned =1 ;
lib/label/label.c +104 -11
176 lines not on this page · raw message
test/shell/pvcreate-operation-md.sh +6 -0
@@ -90,6 +90,12 @@ EOF maj=$(($(stat -L --printf=0x%t "${mddev}p1"))) min=$(($(stat -L --printf=0x%T "${mddev}p1"))) + ls /sys/dev/block/$maj:$min/ + ls /sys/dev/block/$maj:$min/holders/ + cat /sys/dev/block/$maj:$min/dev + cat /sys/dev/block/$maj:$min/stat + cat /sys/dev/block/$maj:$min/size + sysfs_alignment_offset="/sys/dev/block/$maj:$min/alignment_offset" [ -f "$sysfs_alignment_offset" ] && \ alignment_offset=$(< "$sysfs_alignment_offset") || \