aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2013-10-30 11:10:52 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-10-30 11:10:52 -0400
commit8f9ff189205a6817aee5a1f996f876541f86e07c (patch)
treeb4e8fe39050dda70c0b3bb9bfadc988c4c15a4e5 /fs
parent5ba052fe33807893a26076d2ac95cf31d5e0b578 (diff)
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. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Jorge Fábregas <jorge.fabregas@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/mballoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a41e3ba8cfaa..4d113efa024c 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4794,8 +4794,8 @@ do_more:
4794 " group:%d block:%d count:%lu failed" 4794 " group:%d block:%d count:%lu failed"
4795 " with %d", block_group, bit, count, 4795 " with %d", block_group, bit, count,
4796 err); 4796 err);
4797 } 4797 } else
4798 4798 EXT4_MB_GRP_CLEAR_TRIMMED(e4b.bd_info);
4799 4799
4800 ext4_lock_group(sb, block_group); 4800 ext4_lock_group(sb, block_group);
4801 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters); 4801 mb_clear_bits(bitmap_bh->b_data, bit, count_clusters);