Thread (12 messages) 12 messages, 4 authors, 2009-03-31

Re: Ext4 tree backports for 2.6.27.13 and 2.6.28.2

From: Chuck Ebbert <hidden>
Date: 2009-02-11 20:36:20
Also in: lkml

On Wed, 11 Feb 2009 13:29:14 +0530
"Aneesh Kumar K.V" [off-list ref] wrote:
On Sat, Jan 31, 2009 at 12:25:39AM -0500, Theodore Ts'o wrote:
quoted
I've updated the ext4 backport branches on the ext4 git tree:

   git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
   http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git

The for-stable branch is branched off of 2.6.28.2, and has a candidate
set of patches to be included in the next stable release.  The
for-stable-2.6.27 branch is branched off of 2.6.27.13.  

I'm more confident with the 2.6.28 stable candidate than the 2.6.27
stable candidates at the moment, but given that we just missed the
2.6.27.14 and 2.6.28.3 release cycles, that should give us plenty of
time to test the patches.

						- Ted


8556e8f3 18d5cb0 fd3bd090
    ext4: Don't allow new groups to be added during block allocation
This commit on for-stable-2.6.27 is not complete.
ac->alloc_semp is not assigned in the code.
I think this fixes that one:


Add missing pieces to the below patch in the 2.6.27 ext4 patchset.
http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=fd3bd090d7cc93292d3fa361b9c323752417bd7b
"ext4: Don't allow new groups to be added during block allocation"

Signed-off-by: Chuck Ebbert <redacted>

Index: linux-2.6.27.noarch/fs/ext4/mballoc.c
===================================================================
--- linux-2.6.27.noarch.orig/fs/ext4/mballoc.c
+++ linux-2.6.27.noarch/fs/ext4/mballoc.c
@@ -1055,7 +1055,8 @@ static void ext4_mb_release_desc(struct 
 	if (e4b->bd_buddy_page)
 		page_cache_release(e4b->bd_buddy_page);
 	/* Done with the buddy cache */
-	up_read(e4b->alloc_semp);
+	if (e4b->alloc_semp)
+		up_read(e4b->alloc_semp);
 }
 
 
@@ -1375,6 +1376,9 @@ static void ext4_mb_use_best_found(struc
 	get_page(ac->ac_bitmap_page);
 	ac->ac_buddy_page = e4b->bd_buddy_page;
 	get_page(ac->ac_buddy_page);
+	/* on allocation we use ac to track the held semaphore */
+	ac->alloc_semp =  e4b->alloc_semp;
+	e4b->alloc_semp = NULL;
 	/* store last allocated for subsequent stream allocation */
 	if ((ac->ac_flags & EXT4_MB_HINT_DATA)) {
 		spin_lock(&sbi->s_md_lock);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help