X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=ldiskfs%2Fkernel_patches%2Fpatches%2Fext3-extents-2.6.16-sles10.patch;h=a42a6800ed195cfa9d1d3ea156cb001ecd5b03aa;hp=f1f94f2bf9fce0fd59abb584509b93e250282fda;hb=7e59fbcc88cc2df4d20c3d5a2c7b45d5d2494918;hpb=58744d506d55ecbe2a36bb9d86b1e043f9535111 diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch index f1f94f2..a42a680 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch @@ -970,7 +970,7 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c +} + +/* -+ * returns first allocated block from next leaf or EXT_MAX_BLOCK ++ * returns first allocated block from next leaf or EXT_UNSET_BLOCK + */ +static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree, + struct ext3_ext_path *path) @@ -982,7 +982,7 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c + + /* zero-tree has no leaf blocks at all */ + if (depth == 0) -+ return EXT_MAX_BLOCK; ++ return EXT_UNSET_BLOCK; + + /* go to index block */ + depth--; @@ -994,7 +994,7 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c + depth--; + } + -+ return EXT_MAX_BLOCK; ++ return EXT_UNSET_BLOCK; +} + +/* @@ -1112,7 +1112,7 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c + /* probably next leaf has space for us? */ + fex = EXT_LAST_EXTENT(eh); + next = ext3_ext_next_leaf_block(tree, path); -+ if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) { ++ if (newext->ee_block > fex->ee_block && next != EXT_UNSET_BLOCK) { + ext_debug(tree, "next leaf block - %d\n", next); + EXT_ASSERT(!npath); + npath = ext3_ext_find_extent(tree, next, NULL); @@ -1577,8 +1577,8 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c + path[depth].p_ext = ex; + + a = ex->ee_block > start ? ex->ee_block : start; -+ b = ex->ee_block + ex->ee_len - 1 < end ? -+ ex->ee_block + ex->ee_len - 1 : end; ++ b = (unsigned long long)ex->ee_block + ex->ee_len - 1 < ++ end ? ex->ee_block + ex->ee_len - 1 : end; + + ext_debug(tree, " border %u:%u\n", a, b); + @@ -2395,17 +2395,16 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/inode.c if (ext3_should_journal_data(inode)) ret = 3 * (bpp + indirects) + 2; else -Index: linux-2.6.16.54-0.2.5/fs/ext3/Makefile +Index: linux-2.6.18.8/fs/ext3/Makefile =================================================================== ---- linux-2.6.16.54-0.2.5.orig/fs/ext3/Makefile -+++ linux-2.6.16.54-0.2.5/fs/ext3/Makefile -@@ -5,7 +5,8 @@ +--- linux-2.6.18.8.orig/fs/ext3/Makefile 2007-07-17 09:18:11.000000000 +0200 ++++ linux-2.6.18.8/fs/ext3/Makefile 2007-07-17 11:08:11.000000000 +0200 +@@ -5,7 +5,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \ - ioctl.o namei.o super.o symlink.o hash.o resize.o -+ ioctl.o namei.o super.o symlink.o hash.o resize.o \ -+ extents.o ++ ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o @@ -2547,7 +2546,7 @@ Index: linux-2.6.16.54-0.2.5/include/linux/ext3_extents.h =================================================================== --- /dev/null +++ linux-2.6.16.54-0.2.5/include/linux/ext3_extents.h -@@ -0,0 +1,262 @@ +@@ -0,0 +1,263 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. + * Written by Alex Tomas @@ -2593,7 +2592,7 @@ Index: linux-2.6.16.54-0.2.5/include/linux/ext3_extents.h +do { \ + if (test_opt((tree)->inode->i_sb, EXTDEBUG)) \ + printk(fmt, ##a); \ -+} while (0); ++} while (0) +#else +#define ext_debug(tree,fmt,a...) +#endif @@ -2728,6 +2727,7 @@ Index: linux-2.6.16.54-0.2.5/include/linux/ext3_extents.h + + +#define EXT_MAX_BLOCK 0xffffffff ++#define EXT_UNSET_BLOCK 1 + + +#define EXT_FIRST_EXTENT(__hdr__) \