Whamcloud - gitweb
LU-14712 e2fsprogs: support EXT2_FLAG_BG_TRIMMED and EXT2_FLAGS_TRACK_TRIM
authorLi Dongyang <dongyangli@ddn.com>
Fri, 11 Aug 2023 05:17:36 +0000 (15:17 +1000)
committerLi Dongyang <dongyangli@ddn.com>
Tue, 28 May 2024 05:53:20 +0000 (15:53 +1000)
commit795588ee973b739879fcc5e70651cb5b680e31ae
tree053145e2a218d0ca963c6656a72b86f440f2209b
parent3faf56ea488aeae0293c1867cab7e6f57634508f
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