Skip to contentSkip to conversation

ext4: fix FITRIM in no journal mode

PATCH Applied Lukas Czerner 2 participants 2 messages Sep 25, 2013 – Oct 30, 2013 ext4 file system

lore
Share & tools
lore
#0 lore raw

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
index a41e3ba..4d113ef 100644
@@ -4794,8 +4794,8 @@ do_more:
 					 " group:%d block:%d count:%lu failed"
 					 " with %d", block_group, bit, count,
 					 err);
-		}
maintainer Applied
#1 lore raw
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_BIT in journal callback. Fix this by clearing the bit in no journal mode as well.

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