ext4: fix FITRIM in no journal mode
PATCH 1/1 ext4: fix FITRIM in no journal mode
When using FITRIM ioctl on a file system without journal it will only trim the block group once, no matter how many times you invoke FITRIM ioctl and how many block you release from the block group.
It is because we only clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT in journal callback. Fix this by clearing the bit in no journal mode as well.
--- fs/ext4/mballoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/ext4/mballoc.c +0 -1
@@ -4794,8 +4794,8 @@ do_more:" group:%d block:%d count:%lu failed" " with %d" , block_group, bit, count, err); - }
Quoted 9 lines · Lukas Czerner
When using FITRIM ioctl on a file system without journal it will only trim the block group once, no matter how many times you invoke FITRIM ioctl and how many block you release from the block group.
It is because we only clear
EXT4_GROUP_INFO_WAS_TRIMMED_BITin journal callback. Fix this by clearing the bit in no journal mode as well.Signed-off-by Lukas Czerner <[email protected]>Reported-by Jorge Fábregas <[email protected]>
Applied, thanks.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html