btrfs: sysfs: relax bg_reclaim_threshold for debugging purposes
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 13 Mar 2023 07:46:54 +0000 (16:46 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:18 +0000 (18:01 +0200)
commitd1cc579383191fe6c3f1eeac45eb50b8976d38de
tree047a64eb3ddec2e51c16cbe3295660184f2c9984
parent2cef0c79bb81d8bae1dbc45195771a824ca45e76
btrfs: sysfs: relax bg_reclaim_threshold for debugging purposes

Currently, /sys/fs/btrfs/<UUID>/bg_reclaim_threshold is limited to 0
(disable) or [50 .. 100]%, so we need to fill 50% of a device to start the
auto reclaim process. It is cumbersome to do so when we want to shake out
possible race issues of normal write vs reclaim.

Relax the threshold check under the BTRFS_DEBUG option.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c