[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1297789585-5986-2-git-send-email-lczerner@redhat.com>
Date: Tue, 15 Feb 2011 18:06:25 +0100
From: Lukas Czerner <lczerner@...hat.com>
To: linux-ext4@...r.kernel.org
Cc: tytso@....edu, lczerner@...hat.com
Subject: [PATCH 2/2] ext4: Adjust mineln with discard_granularity in FITRIM code
Discard granularity tells us the minimum size of extent to be discarded.
Use that information to adjust minlen properly in FITRIM code. Smaller
extents will be ignored anyway, so we can optimize by not even trying to
discard them.
Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
fs/ext4/ioctl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 25ba7c7..c052c9f 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -348,6 +348,8 @@ mext_out:
sizeof(range)))
return -EFAULT;
+ range.minlen = max((unsigned int)range.minlen,
+ q->limits.discard_granularity);
ret = ext4_trim_fs(sb, &range);
if (ret < 0)
return ret;
--
1.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists