[PATCH 9/9] jfs: fix regression preventing coalescing of extents

[email protected] Wed, 17 Jun 2009 08:44:30 -0500 (CDT)
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
commit f7c52fd17a7dda42fc9e88c2b2678403419bfe63
Author: Dave Kleikamp <[email protected]>
Date:   Tue Jun 16 13:43:22 2009 -0500

    jfs: fix regression preventing coalescing of extents
    
    Commit fec1878fe952b994125a3be7c94b1322db586f3b caused a regression in
    which contiguous blocks being allocated to the end of an extent were
    getting a new extent created.  This typically results in files entirely
    made up of 1-block extents even though the blocks are contiguous on
    disk.
    
    Apparently grub doesn't handle a jfs file being fragmented into too many
    extents, since it refuses to boot a kernel from jfs that was created by
    the 2.6.30 kernel.
    
    Signed-off-by: Dave Kleikamp <[email protected]>
    Reported-by: Alex <[email protected]>

diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c
index bbbd5f2..41d6045 100644
--- a/fs/jfs/jfs_extent.c
+++ b/fs/jfs/jfs_extent.c
@@ -391,6 +391,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp)
 		}
 		XADaddress(xp, xaddr);
 		XADlength(xp, xlen);
+		XADoffset(xp, prev);
 		/*
 		 * only preserve the abnr flag within the xad flags
 		 * of the returned hint.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects