[patch 039/108] jfs: fix regression preventing coalescing of extents

Greg KH
2009-07-01T00:57:34Z

[-- Attachment #1: jfs-fix-regression-preventing-coalescing-of-extents.patch --]
[-- Type: text/plain, Size: 1157 bytes --]

2.6.30-stable review patch. If anyone has any objections, please let us know.

------------------

From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>

commit f7c52fd17a7dda42fc9e88c2b2678403419bfe63 upstream.

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 <shaggy@linux.vnet.ibm.com>
Reported-by: Alex <alevkovich@tut.by>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
fs/jfs/jfs_extent.c | 1 +
1 file changed, 1 insertion(+)

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