Whamcloud - gitweb
b=22514 fork ldiskfs patches between sles11 & rhel5
authoryangsheng <sheng.yang@sun.com>
Fri, 18 Jun 2010 20:51:53 +0000 (22:51 +0200)
committerJohann Lombardi <johann@sun.com>
Fri, 18 Jun 2010 20:51:53 +0000 (22:51 +0200)
i=johann

Landing for RHEL 5.5 support has broken build for SLES11.

ldiskfs/kernel_patches/patches/ext4-dynlocks-2.6.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext4-ext_generation-rhel5.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext4-ext_generation-sles11.patch
ldiskfs/kernel_patches/patches/ext4-pdir-fix-rhel5.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext4-pdir-fix.patch
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series

diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-2.6.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-2.6.patch
new file mode 100644 (file)
index 0000000..2a11baa
--- /dev/null
@@ -0,0 +1,32 @@
+diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/Makefile linux-2.6.27.21-0.1_2//fs/ext4/Makefile
+--- linux-2.6.27.21-0.1_1//fs/ext4/Makefile    2009-08-21 15:12:51.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/Makefile    2009-08-21 15:13:23.000000000 +0530
+@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o
+ ext4dev-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 extents.o \
+-                 ext4_jbd2.o migrate.o mballoc.o
++                 ext4_jbd2.o migrate.o mballoc.o dynlocks.o
+ ext4dev-$(CONFIG_EXT4DEV_FS_XATTR)    += xattr.o xattr_user.o xattr_trusted.o
+ ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL)        += acl.o
+diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/super.c linux-2.6.27.21-0.1_2//fs/ext4/super.c
+--- linux-2.6.27.21-0.1_1//fs/ext4/super.c     2009-08-21 15:12:51.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/super.c     2009-08-21 15:18:18.000000000 +0530
+@@ -4126,6 +4126,7 @@ static int __init init_ext4_fs(void)
+       err = init_inodecache();
+       if (err)
+               goto out1;
++      dynlock_cache_init();
+       err = register_filesystem(&ext4_fs_type);
+       if (err)
+               goto out;
+@@ -4149,6 +4150,7 @@ static void __exit exit_ext4_fs(void)
+       unregister_filesystem(&ext4_fs_type);
+       unregister_filesystem(&ext4dev_fs_type);
+       destroy_inodecache();
++      dynlock_cache_exit();
+       exit_ext4_xattr();
+       exit_ext4_mballoc();
+       remove_proc_entry("fs/ext4", NULL);
+
diff --git a/ldiskfs/kernel_patches/patches/ext4-ext_generation-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-ext_generation-rhel5.patch
new file mode 100644 (file)
index 0000000..490d92e
--- /dev/null
@@ -0,0 +1,48 @@
+Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h
+===================================================================
+--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h    2009-07-07 14:47:22.000000000 +0530
++++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h 2009-07-07 14:49:31.000000000 +0530
+@@ -203,6 +203,11 @@
+       return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
+ }
++static inline void ext4_ext_tree_changed(struct inode *inode)
++{
++      EXT4_I(inode)->i_ext_generation++;
++}
++
+ static inline void
+ ext4_ext_invalidate_cache(struct inode *inode)
+ {
+Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h
+===================================================================
+--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h    2009-07-07 14:47:13.000000000 +0530
++++ linux-2.6.27.21-0.1/fs/ext4/ext4.h 2009-07-07 14:50:07.000000000 +0530
+@@ -114,6 +114,7 @@
+       struct inode vfs_inode;
+       struct jbd2_inode jinode;
++      unsigned long i_ext_generation;
+       struct ext4_ext_cache i_cached_extent;
+       /*
+        * File creation time. Its function is same as that of
+Index: linux-2.6.27.21-0.1/fs/ext4/extents.c
+===================================================================
+--- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c 2009-07-07 14:48:03.000000000 +0530
++++ linux-2.6.27.21-0.1/fs/ext4/extents.c      2009-07-07 14:48:58.000000000 +0530
+@@ -1618,6 +1618,7 @@
+               ext4_ext_drop_refs(npath);
+               kfree(npath);
+       }
++      ext4_ext_tree_changed(inode);
+       ext4_ext_invalidate_cache(inode);
+       return err;
+ }
+@@ -2279,6 +2280,7 @@
+               }
+       }
+ out:
++      ext4_ext_tree_changed(inode);
+       ext4_ext_drop_refs(path);
+       kfree(path);
+       ext4_journal_stop(handle);
index 490d92e..6d51ad3 100644 (file)
@@ -14,10 +14,10 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h
  static inline void
  ext4_ext_invalidate_cache(struct inode *inode)
  {
-Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h
+Index: linux-2.6.27.21-0.1/fs/ext4/ext4_i.h
 ===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h    2009-07-07 14:47:13.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4.h 2009-07-07 14:50:07.000000000 +0530
+--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_i.h  2009-07-07 14:47:13.000000000 +0530
++++ linux-2.6.27.21-0.1/fs/ext4/ext4_i.h       2009-07-07 14:50:07.000000000 +0530
 @@ -114,6 +114,7 @@
        struct inode vfs_inode;
        struct jbd2_inode jinode;
diff --git a/ldiskfs/kernel_patches/patches/ext4-pdir-fix-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-pdir-fix-rhel5.patch
new file mode 100644 (file)
index 0000000..99bb9ff
--- /dev/null
@@ -0,0 +1,59 @@
+diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/ext4_i.h linux-2.6.27.21-0.1_2//fs/ext4/ext4_i.h
+--- linux-2.6.27.21-0.1_1//fs/ext4/ext4.h      2009-08-24 13:00:59.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/ext4.h      2009-08-24 13:01:25.000000000 +0530
+@@ -16,6 +16,7 @@
+ #include <linux/blkdev.h>
+ #include <linux/magic.h>
+ #include <linux/jbd2.h>
++#include <linux/dynlocks.h>
+ #include <linux/rwsem.h>
+ #include <linux/rbtree.h>
+ #include <linux/seqlock.h>
+@@ -56,7 +57,9 @@ struct ext4_inode_info {
+       __u32   i_flags;
+       ext4_fsblk_t    i_file_acl;
+       __u32   i_dtime;
+-
++      /* following fields for parallel directory operations -bzzz */
++      struct dynlock   i_htree_lock;
++      struct semaphore i_append_sem;
+       /*
+        * i_block_group is the number of the block group which contains
+        * this file's inode.  Constant across the lifetime of the inode,
+diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/namei.c linux-2.6.27.21-0.1_2//fs/ext4/namei.c
+--- linux-2.6.27.21-0.1_1//fs/ext4/namei.c     2009-08-24 13:00:59.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/namei.c     2009-08-24 13:03:45.000000000 +0530
+@@ -55,6 +55,11 @@ static struct buffer_head *ext4_append(h
+                                       ext4_lblk_t *block, int *err)
+ {
+       struct buffer_head *bh;
++      struct ext4_inode_info *ei = EXT4_I(inode);
++
++      /* with parallel dir operations all appends
++      * have to be serialized -bzzz */
++      down(&ei->i_append_sem);
+       *block = inode->i_size >> inode->i_sb->s_blocksize_bits;
+@@ -67,7 +72,9 @@ static struct buffer_head *ext4_append(h
+                       brelse(bh);
+                       bh = NULL;
+               }
++              ei->i_disksize = inode->i_size;
+       }
++      up(&ei->i_append_sem);
+       return bh;
+ }
+diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/super.c linux-2.6.27.21-0.1_2//fs/ext4/super.c
+--- linux-2.6.27.21-0.1_1//fs/ext4/super.c     2009-08-24 13:00:59.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/super.c     2009-08-24 13:01:25.000000000 +0530
+@@ -635,6 +635,8 @@ static struct inode *ext4_alloc_inode(st
+ #endif
+       ei->vfs_inode.i_version = 1;
+       ei->vfs_inode.i_data.writeback_index = 0;
++      dynlock_init(&ei->i_htree_lock);
++      sema_init(&ei->i_append_sem, 1);
+       memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
+       INIT_LIST_HEAD(&ei->i_prealloc_list);
+       spin_lock_init(&ei->i_prealloc_lock);
index 99bb9ff..b9db2ed 100644 (file)
@@ -1,10 +1,10 @@
 diff -rupN linux-2.6.27.21-0.1_1//fs/ext4/ext4_i.h linux-2.6.27.21-0.1_2//fs/ext4/ext4_i.h
---- linux-2.6.27.21-0.1_1//fs/ext4/ext4.h      2009-08-24 13:00:59.000000000 +0530
-+++ linux-2.6.27.21-0.1_2//fs/ext4/ext4.h      2009-08-24 13:01:25.000000000 +0530
+--- linux-2.6.27.21-0.1_1//fs/ext4/ext4_i.h    2009-08-24 13:00:59.000000000 +0530
++++ linux-2.6.27.21-0.1_2//fs/ext4/ext4_i.h    2009-08-24 13:01:25.000000000 +0530
 @@ -16,6 +16,7 @@
- #include <linux/blkdev.h>
- #include <linux/magic.h>
- #include <linux/jbd2.h>
+ #ifndef _EXT4_I
+ #define _EXT4_I
 +#include <linux/dynlocks.h>
  #include <linux/rwsem.h>
  #include <linux/rbtree.h>
index 59acd5d..4049c57 100644 (file)
@@ -16,13 +16,13 @@ ext4-big-endian-check-2.6-rhel5.patch
 ext4-alloc-policy-2.6-rhel5.patch
 ext4-misc-rhel5.patch
 ext4-force_over_16tb-rhel5.patch
-ext4-pdir-fix.patch
+ext4-pdir-fix-rhel5.patch
 ext4-osd-iop-common.patch
 ext4-osd-iam-exports.patch
 ext4-dynlocks-common.patch
 ext4-dynlocks-2.6-rhel5.patch
 ext4-hash-indexed-dir-dotdot-update-rhel5.patch
-ext4-ext_generation-sles11.patch
+ext4-ext_generation-rhel5.patch
 ext4-kill-dx_root.patch
 ext4_data_in_dirent.patch
 ext4-extents-mount-option-rhel5.patch
index 909a704..dd8237d 100644 (file)
@@ -30,7 +30,7 @@ ext4-pdir-fix.patch
 ext4-osd-iop-common-sles11.patch
 ext4-osd-iam-exports.patch
 ext4-dynlocks-common-sles11.patch
-ext4-dynlocks-2.6-rhel5.patch
+ext4-dynlocks-2.6.patch
 ext4-hash-indexed-dir-dotdot-update.patch
 ext4-disable-write-bar-by-default.patch
 ext4-mballoc-skip-grps.patch