Whamcloud - gitweb
b=20298 (Merge head ldiskfs and b1_8 ldiskfs)
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-extents-2.6.16-sles10.patch
index 6289f1b..5b363ea 100644 (file)
@@ -4,7 +4,7 @@ Index: linux-2.6.16.54-0.2.5/fs/ext3/extents.c
 +++ linux-2.6.16.54-0.2.5/fs/ext3/extents.c
 @@ -0,0 +1,2264 @@
 +/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
++ * Copyright 2008 Sun Microsystems, Inc.
 + * Written by Alex Tomas <alex@clusterfs.com>
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -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,9 +2546,9 @@ 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 (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
++ * Copyright 2008 Sun Microsystems, Inc.
 + * Written by Alex Tomas <alex@clusterfs.com>
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -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__) \