Whamcloud - gitweb
LU-14712 ldiskfs: keep EXT4_BG_TRIMMED flag in memory 12/59312/7
authorLi Dongyang <dongyangli@ddn.com>
Fri, 23 May 2025 10:05:47 +0000 (20:05 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Jun 2025 06:36:12 +0000 (06:36 +0000)
commitebb7c944a0115852fdcb0b32b078aed28292b054
tree464d0491e6ee9b7525e0533fb841047ea616c9d4
parent919c5d25fc45121466ae0ea803558039a2162538
LU-14712 ldiskfs: keep EXT4_BG_TRIMMED flag in memory

Keep the EXT4_BG_TRIMMED flag in memory for the trimmed block groups
so that the filesystem without track_trim superblock bit(e.g. existing
filesystem created with earlier version of e2fsprogs) can still
skip trimmed block groups during fstrim as long as it's mounted.

For persistent trimmed block group tracking we should turn on track_trim
with tune2fs.

Change-Id: I19df047c717d3b20310fcba7fa682b6dfab9d5e4
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59312
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/rhel7.9/ext4-introduce-EXT4_BG_TRIMMED-to-optimize-fstrim.patch
ldiskfs/kernel_patches/patches/rhel8.7/ext4-introduce-EXT4_BG_TRIMMED-to-optimize-fstrim.patch
ldiskfs/kernel_patches/patches/rhel9.4/ext4-introduce-EXT4_BG_TRIMMED-to-optimize-fstrim.patch
ldiskfs/kernel_patches/patches/rhel9/ext4-introduce-EXT4_BG_TRIMMED-to-optimize-fstrim.patch