Message ID | 20230118074458.2985005-2-naohiro.aota@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: docs: add entries to sysfs documentation | expand |
On 18.01.23 09:16, Naohiro Aota wrote: > +Files in `/sys/fs/btrfs/<UUID>/allocations/{data,metadata,system}` directory are: > + > +bg_reclaim_threshold > + (RW, since: 5.19) > + > + Reclaimable space percentage of block group's size (excluding permanently unusable space) to reclaim the block group. > + Used for zoned devices. I'd discard the last sentence, as the bg_reclaim_threshold is used on non-zoned devices as well. > + > Files in `/sys/fs/btrfs/<UUID>/devinfo/<DEVID>` directory are:
diff --git a/Documentation/ch-sysfs.rst b/Documentation/ch-sysfs.rst index 96fdaa34bff3..37fb49f945c7 100644 --- a/Documentation/ch-sysfs.rst +++ b/Documentation/ch-sysfs.rst @@ -29,7 +29,7 @@ Files in `/sys/fs/btrfs/<UUID>/` directory are: bg_reclaim_threshold (RW, since: 5.19) - Used space percentage to start auto block group claim. + Used space percentage of total device space to start auto block group claim. Mostly for zoned devices. checksum @@ -117,6 +117,14 @@ global_rsv_size Space info accounting for the 3 chunk types. Mostly for debug purposes. +Files in `/sys/fs/btrfs/<UUID>/allocations/{data,metadata,system}` directory are: + +bg_reclaim_threshold + (RW, since: 5.19) + + Reclaimable space percentage of block group's size (excluding permanently unusable space) to reclaim the block group. + Used for zoned devices. + Files in `/sys/fs/btrfs/<UUID>/devinfo/<DEVID>` directory are: error_stats:
There are two "bg_reclaim_threshold" under the sysfs directory. One is at /sys/fs/btrfs/<UUID>/ and sets the threshold to start the auto reclaim thread. The other one is at/sys/fs/btrfs/<UUID>/allocations/{data,metadata,system} and sets the threshold to reclaim a block group. These two options have the same name but they are calculated against different metrics. The former is a percentage of allocated (for a device extent) space on total device space, and the latter is a percentage of reclaimable space on a block group's zone capacity. Add description for per-space_info bg_reclaim_threshold to distinguish these two same name configurations. Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> --- Documentation/ch-sysfs.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)