Whamcloud - gitweb
LU-14712 e2fsprogs: support EXT2_FLAG_BG_TRIMMED and EXT2_FLAGS_TRACK_TRIM 24/51924/3
authorLi Dongyang <dongyangli@ddn.com>
Fri, 11 Aug 2023 05:17:36 +0000 (15:17 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 29 Aug 2023 17:33:34 +0000 (17:33 +0000)
commit3bf271a76463c3d238f342e39f4f2813e7df6442
treecfc10711285321a9b01581acc7b6083cfa50000e
parentcc6a3d0d898cc06dc87780305f6427d6dec5e120
LU-14712 e2fsprogs: support EXT2_FLAG_BG_TRIMMED and EXT2_FLAGS_TRACK_TRIM

This adds EXT2_FLAG_BG_TRIMMED, which is used on block group
descriptors during mke2fs after discard is done.
The EXT2_FLAG_BG_TRIMMED flag is cleared on the block group when
we free blocks.

Introduce EXT2_FLAGS_TRACK_TRIM, which is a new super block flag,
to indicate whether we should honour the EXT2_FLAG_BG_TRIMMED
set on each block group.
EXT2_FLAGS_TRACK_TRIM itself can be turned on/off via tune2fs.

Make dumpe2fs aware of the new flags.

Change-Id: I5af88fe4a32c8c9ab5604b84362a7140ae2cdde5
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/51924
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lib/e2p/ls.c
lib/ext2fs/alloc_stats.c
lib/ext2fs/ext2_fs.h
misc/dumpe2fs.c
misc/mke2fs.c
misc/tune2fs.8.in
misc/tune2fs.c