summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-09-18 16:44:32 -0400
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:17:58 +0200
commit124604eb50f88e6c1ff6587bdd2fc09bea810b32 (patch)
treefc3b578808253f04b802fcf801469cab06829454 /COPYING
parent905eb88bceb253aa0f475eb04eec149d6059126e (diff)
btrfs: init device stats for seed devices
We recently started recording device stats across the fleet, and noticed a large increase in messages such as this BTRFS warning (device dm-0): get dev_stats failed, not yet valid on our tiers that use seed devices for their root devices. This is because we do not initialize the device stats for any seed devices if we have a sprout device and mount using that sprout device. The basic steps for reproducing are: $ mkfs seed device $ mount seed device # fill seed device $ umount seed device $ btrfstune -S 1 seed device $ mount seed device $ btrfs device add -f sprout device /mnt/wherever $ umount /mnt/wherever $ mount sprout device /mnt/wherever $ btrfs device stats /mnt/wherever This will fail with the above message in dmesg. Fix this by iterating over the fs_devices->seed if they exist in btrfs_init_dev_stats. This fixed the problem and properly reports the stats for both devices. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> [ rename to btrfs_device_init_dev_stats ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions