* Patch "ext4: trim allocation requests to group size" has been added to the 4.4-stable tree
@ 2017-03-08 15:39 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-03-08 15:39 UTC (permalink / raw)
To: jack, gregkh, kirill.shutemov, tytso; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ext4: trim allocation requests to group size
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ext4-trim-allocation-requests-to-group-size.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cd648b8a8fd5071d232242d5ee7ee3c0815776af Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Fri, 27 Jan 2017 14:34:30 -0500
Subject: ext4: trim allocation requests to group size
From: Jan Kara <jack@suse.cz>
commit cd648b8a8fd5071d232242d5ee7ee3c0815776af upstream.
If filesystem groups are artifically small (using parameter -g to
mkfs.ext4), ext4_mb_normalize_request() can result in a request that is
larger than a block group. Trim the request size to not confuse
allocation code.
Reported-by: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/mballoc.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3120,6 +3120,13 @@ ext4_mb_normalize_request(struct ext4_al
if (ar->pright && start + size - 1 >= ar->lright)
size -= start + size - ar->lright;
+ /*
+ * Trim allocation request for filesystems with artificially small
+ * groups.
+ */
+ if (size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb))
+ size = EXT4_BLOCKS_PER_GROUP(ac->ac_sb);
+
end = start + size;
/* check we don't cross already preallocated blocks */
Patches currently in stable-queue which might be from jack@suse.cz are
queue-4.4/ext4-fix-data-corruption-in-data-journal-mode.patch
queue-4.4/ext4-trim-allocation-requests-to-group-size.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-08 15:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 15:39 Patch "ext4: trim allocation requests to group size" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.