mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-27 21:47:56 +00:00
btrfs-progs: there is devid 0 when replace is running
as of now, when we replace a disk, it is added to the dev list with devid 0. And we fail to obtain details of devid 0 because we don't query devid 0 at all. reproducer: btrfs rep start /dev/sdb /dev/sdf /btrfs btrfs fi show Label: none uuid: f8fb9819-16c8-47b7-b62f-0ff90f8c56cd Total devices 3 FS bytes used 1.94GiB devid 1 size 1.10GiB used 1.10GiB path /dev/sdb devid 2 size 1.10GiB used 1.08GiB path /dev/sdc devid 0 size 0.00 used 0.00 path this patch will make it proper by querying devid 0. btrfs repl start /dev/sdb /dev/sdf /btrfs btrfs fi show /btrfs Label: none uuid: f8fb9819-16c8-47b7-b62f-0ff90f8c56cd Total devices 3 FS bytes used 1.94GiB devid 0 size 1.10GiB used 1.10GiB path /dev/sdf devid 1 size 1.10GiB used 1.10GiB path /dev/sdb devid 2 size 1.10GiB used 1.08GiB path /dev/sdc Its fine to query devid 0 when there is no replace activity as well, because we just skip the error ENODEV btrfs fi show /btrfs Label: none uuid: f8fb9819-16c8-47b7-b62f-0ff90f8c56cd Total devices 2 FS bytes used 1.94GiB devid 1 size 1.10GiB used 1.10GiB path /dev/sdf devid 2 size 1.10GiB used 1.08GiB path /dev/sdc Signed-off-by: Anand Jain <Anand.Jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
6262e12206
commit
50275bacab
Loading…
Reference in New Issue
Block a user