* [PATCH] ext4: fix FITRIM in no journal mode
@ 2013-09-25 9:46 Lukas Czerner
2013-10-30 15:12 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Czerner @ 2013-09-25 9:46 UTC (permalink / raw)
To: linux-ext4; +Cc: 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.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reported-by: Jorge Fábregas <jorge.fabregas@gmail.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 a41e3ba..4d113ef 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4794,8 +4794,8 @@ do_more:
" group:%d block:%d count:%lu failed"
" with %d", block_group, bit, count,
err);
- }
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: fix FITRIM in no journal mode
2013-09-25 9:46 [PATCH] ext4: fix FITRIM in no journal mode Lukas Czerner
@ 2013-10-30 15:12 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2013-10-30 15:12 UTC (permalink / raw)
To: Lukas Czerner; +Cc: linux-ext4
On Wed, Sep 25, 2013 at 11:46:25AM +0200, Lukas Czerner wrote:
> 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>
> Reported-by: Jorge Fábregas <jorge.fabregas@gmail.com>
Applied, thanks.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 9:46 [PATCH] ext4: fix FITRIM in no journal mode Lukas Czerner
2013-10-30 15:12 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).