LU-14712 ldiskfs: add bg_trimmed_threshold interface
Export interface bg_trimmed_threshold via sysfs, and only clear
BG_TRIMMED flag when there are enough blocks freed since
last fstrim(default 128).
Make sure we use cpu_to_le32() with EXT2_FLAGS_TRACK_TRIM.
Change-Id: I98d86f6d7335af53b8e74c747797b0dff3abb5d0
Test-Parameters: trivial
Fixes:
ad30edf910 ("LU-14712 ldiskfs: introduce EXT4_BG_TRIMMED to optimize fstrim")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55567
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>