mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-03 19:31:44 +00:00
681b4bd5e1
Currently btrfs-progs will happily enumerate any device which has a btrfs filesystem on it irrespective of its type. For the majority of use cases that's fine and there haven't been any problems with that. However, there was a recent report that in multipath scenario when running "btrfs fi show" after a path flap (path going down and then coming back up) instead of the multipath device being show the device which represents the flapped path is shown. So a multipath filesystem might look like: Label: none uuid: d3c1261f-18be-4015-9fef-6b35759dfdba Total devices 1 FS bytes used 192.00KiB devid 1 size 10.00GiB used 536.00MiB path /dev/mapper/3600140501cc1f49e5364f0093869c763 /dev/mapper/xxx is actually backed by an arbitrary number of paths, which in turn are presented to the system as ordinary SCSI devices i.e /dev/sdX. If a path flaps and a user re-runs 'btrfs fi show' the output would look like: Label: none uuid: d3c1261f-18be-4015-9fef-6b35759dfdba Total devices 1 FS bytes used 192.00KiB devid 1 size 10.00GiB used 536.00MiB path /dev/sdd This only occurs on unmounted filesystems as those are enumerated by btrfs-progs, for mounted filesystem the kernel properly deals only with the actual multipath device. Turns out the output of this command is consumed by libraries and the presence of a path device rather than the actual multipath causes issues. Fix this by checking for the presence of DM_MULTIPATH_DEVICE_PATH udev attribute as multipath path devices are tagged with this attribute by the multipath udev scripts. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
box.h | ||
defs.h | ||
device-scan.c | ||
device-scan.h | ||
device-utils.c | ||
device-utils.h | ||
extent-cache.c | ||
extent-cache.h | ||
format-output.c | ||
format-output.h | ||
fsfeatures.c | ||
fsfeatures.h | ||
help.c | ||
help.h | ||
internal.h | ||
messages.c | ||
messages.h | ||
open-utils.c | ||
open-utils.h | ||
parse-utils.c | ||
parse-utils.h | ||
path-utils.c | ||
path-utils.h | ||
rbtree-utils.c | ||
rbtree-utils.h | ||
repair.c | ||
repair.h | ||
send-stream.c | ||
send-stream.h | ||
send-utils.c | ||
send-utils.h | ||
string-table.c | ||
string-table.h | ||
task-utils.c | ||
task-utils.h | ||
units.c | ||
units.h | ||
utils-lib.c | ||
utils.c | ||
utils.h |