diff options
author | David Sterba <dsterba@suse.com> | 2022-07-25 21:15:15 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:27:57 +0200 |
commit | fb731430be32068735905c05a86b9eaaa3bb60c7 (patch) | |
tree | d4310cb363d028f135234eba0ab89c11b4ee7b08 /fs/btrfs/ctree.h | |
parent | btrfs: use delayed items when logging a directory (diff) | |
download | linux-fb731430be32068735905c05a86b9eaaa3bb60c7.tar.xz linux-fb731430be32068735905c05a86b9eaaa3bb60c7.zip |
btrfs: sysfs: show discard stats and tunables in non-debug build
When discard=async was introduced there were also sysfs knobs and stats
for debugging and tuning, hidden under CONFIG_BTRFS_DEBUG. The defaults
have been set and so far seem to satisfy all users on a range of
workloads. As there are not only tunables (like iops or kbps) but also
stats tracking amount of discardable bytes, that should be available
when the async discard is on (otherwise it's not).
The stats are moved from the per-fs debug directory, so it's under
/sys/fs/btrfs/FSID/discard
- discard_bitmap_bytes - amount of discarded bytes from data tracked as
bitmaps
- discard_extent_bytes - dtto but as extents
- discard_bytes_saved -
- discardable_bytes - amount of bytes that can be discarded
- discardable_extents - number of extents to be discarded
- iops_limit - tunable limit of number of discard IOs to be issued
- kbps_limit - tunable limit of kilobytes per second issued as discard IO
- max_discard_size - tunable limit for size of one IO discard request
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e9f60d746068..b678d322ec2c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -890,6 +890,7 @@ struct btrfs_fs_info { struct kobject *space_info_kobj; struct kobject *qgroups_kobj; + struct kobject *discard_kobj; /* used to keep from writing metadata until there is a nice batch */ struct percpu_counter dirty_metadata_bytes; @@ -1109,7 +1110,6 @@ struct btrfs_fs_info { #ifdef CONFIG_BTRFS_DEBUG struct kobject *debug_kobj; - struct kobject *discard_debug_kobj; struct list_head allocated_roots; spinlock_t eb_leak_lock; |