[3.11.y.z extended stable] Patch "ext4: fix FITRIM in no journal mode" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Jan 9 12:05:24 UTC 2014
This is a note to let you know that I have just added a patch titled
ext4: fix FITRIM in no journal mode
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 620b632f629b40a72dc9765de7d2409008bfb220 Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner at redhat.com>
Date: Wed, 30 Oct 2013 11:10:52 -0400
Subject: ext4: fix FITRIM in no journal mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 8f9ff189205a6817aee5a1f996f876541f86e07c upstream.
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 at redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
Reported-by: Jorge Fábregas <jorge.fabregas at gmail.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/ext4/mballoc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index cb1ffce..5f54d05 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4776,8 +4776,8 @@ do_more:
" group:%d block:%d count:%lu failed"
" with %d", block_group, bit, count,
err);
- }
-
+ } else
+ EXT4_MB_GRP_CLEAR_TRIMMED(e4b.bd_info);
ext4_lock_group(sb, block_group);
mb_clear_bits(bitmap_bh->b_data, bit, count_clusters);
--
1.8.3.2
More information about the kernel-team
mailing list