]> www.infradead.org Git - nvme.git/commit
btrfs: report reclaim stats in sysfs
authorBoris Burkov <boris@bur.io>
Thu, 25 Jan 2024 22:10:30 +0000 (14:10 -0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:27 +0000 (15:33 +0200)
commit243192b6764990e7fa0e22ea65b4d12f3294471c
tree38098f9b81ec4cb868f993b165c8849dab006fe1
parenta5b3abb18c380177d3a994d30a2ab890f27b8df8
btrfs: report reclaim stats in sysfs

When evaluating various reclaim strategies/thresholds against each
other, it is useful to collect data about the amount of reclaim
happening. Expose a count, error count, and byte count via sysfs
per space_info.

Note that this is only for automatic reclaim, not manually invoked
balances or other codepaths that use "relocate_block_group"

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/space-info.h
fs/btrfs/sysfs.c