Whamcloud - gitweb
LU-228 kernel: remove more unused kernel patches
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 17 Jun 2011 20:01:44 +0000 (14:01 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 29 Jul 2011 00:42:42 +0000 (20:42 -0400)
The filterdata patches have been unused and unnecessary for some
time already.  The jbd-slab-race and include-fixes patches were
merged into the upstream kernel and back-ported into RHEL5.

Change-Id: I01851a60ecf453f6eb5dbfc4f573444f4f220861
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/ext3-filterdata-sles10.patch [deleted file]
ldiskfs/kernel_patches/patches/ext4-filterdata-rhel5.patch [deleted file]
ldiskfs/kernel_patches/patches/ext4-filterdata-sles11.patch [deleted file]
ldiskfs/kernel_patches/patches/ext4-include-fixes-2.6-rhel5.patch [deleted file]
lustre/kernel_patches/patches/i_filter_data.patch [deleted file]
lustre/kernel_patches/patches/jbd-slab-race-2.6-rhel5.patch [deleted file]

diff --git a/ldiskfs/kernel_patches/patches/ext3-filterdata-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-filterdata-sles10.patch
deleted file mode 100644 (file)
index 5f7c8c9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.16.27-0.9-full/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.16.27-0.9-full.orig/include/linux/ext3_fs_i.h    2007-03-28 16:03:20.000000000 +0400
-+++ linux-2.6.16.27-0.9-full/include/linux/ext3_fs_i.h 2007-03-28 19:40:53.000000000 +0400
-@@ -139,6 +139,8 @@ struct ext3_inode_info {
-       /* mballoc */
-       struct list_head i_prealloc_list;
-       spinlock_t i_prealloc_lock;
-+
-+      void *i_filterdata;
- };
- #endif        /* _LINUX_EXT3_FS_I */
-Index: linux-2.6.16.27-0.9-full/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.27-0.9-full.orig/fs/ext3/super.c      2007-03-28 18:20:17.000000000 +0400
-+++ linux-2.6.16.27-0.9-full/fs/ext3/super.c   2007-03-28 19:40:53.000000000 +0400
-@@ -462,6 +462,7 @@ static struct inode *ext3_alloc_inode(st
-       memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
-       INIT_LIST_HEAD(&ei->i_prealloc_list);
-       spin_lock_init(&ei->i_prealloc_lock);
-+      ei->i_filterdata = NULL;
-       return &ei->vfs_inode;
- }
diff --git a/ldiskfs/kernel_patches/patches/ext4-filterdata-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-filterdata-rhel5.patch
deleted file mode 100644 (file)
index 2bb1d36..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.18.i386/fs/ext4/ext4_i.h
-===================================================================
---- linux-2.6.18.i386.orig/fs/ext4/ext4_i.h
-+++ linux-2.6.18.i386/fs/ext4/ext4_i.h
-@@ -162,6 +162,8 @@ struct ext4_inode_info {
-       __u16 i_extra_isize;
-
-       spinlock_t i_block_reservation_lock;
-+
-+      void *i_filterdata;
- };
- #endif        /* _EXT4_I */
-Index: linux-2.6.18.i386/fs/ext4/super.c
-===================================================================
---- linux-2.6.18.i386.orig/fs/ext4/super.c
-+++ linux-2.6.18.i386/fs/ext4/super.c
-@@ -574,6 +574,7 @@ static struct inode *ext4_alloc_inode(st
-       ei->i_allocated_meta_blocks = 0;
-       ei->i_delalloc_reserved_flag = 0;
-       spin_lock_init(&(ei->i_block_reservation_lock));
-+      ei->i_filterdata = NULL;
-       return &ei->vfs_inode;
- }
diff --git a/ldiskfs/kernel_patches/patches/ext4-filterdata-sles11.patch b/ldiskfs/kernel_patches/patches/ext4-filterdata-sles11.patch
deleted file mode 100644 (file)
index ea83bcd..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.27.21-0.1/fs/ext4/ext4_i.h
-===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_i.h
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4_i.h
-@@ -135,6 +135,8 @@ struct ext4_inode_info {
-       __u16 i_extra_isize;
-       spinlock_t i_block_reservation_lock;
-+
-+      void *i_filterdata;
- };
- #endif        /* _EXT4_I */
-Index: linux-2.6.27.21-0.1/fs/ext4/super.c
-===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/super.c
-+++ linux-2.6.27.21-0.1/fs/ext4/super.c
-@@ -624,6 +624,7 @@ static struct inode *ext4_alloc_inode(st
-       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);
-+      ei->i_filterdata = NULL;
-       jbd2_journal_init_jbd_inode(&ei->jinode, &ei->vfs_inode);
-       ei->i_reserved_data_blocks = 0;
-       ei->i_reserved_meta_blocks = 0;
diff --git a/ldiskfs/kernel_patches/patches/ext4-include-fixes-2.6-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-include-fixes-2.6-rhel5.patch
deleted file mode 100644 (file)
index 0009eaa..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: linux-2.6.18.i386/fs/ext4/ext4.h
-===================================================================
---- linux-2.6.18.i386.orig/fs/ext4/ext4.h
-+++ linux-2.6.18.i386/fs/ext4/ext4.h
-@@ -541,12 +541,13 @@ do {                                                                            \
- #define EXT4_MOUNT_IOPEN              0x8000000 /* Allow access via iopen */
- #define EXT4_MOUNT_IOPEN_NOPRIV               0x10000000 /* Make iopen world-readable */
- /* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
--#ifndef _LINUX_EXT2_FS_H
-+#ifndef clear_opt
- #define clear_opt(o, opt)             o &= ~EXT4_MOUNT_##opt
- #define set_opt(o, opt)                       o |= EXT4_MOUNT_##opt
- #define test_opt(sb, opt)             (EXT4_SB(sb)->s_mount_opt & \
-                                        EXT4_MOUNT_##opt)
--#else
-+#endif
-+#ifndef EXT2_MOUNT_NOLOAD
- #define EXT2_MOUNT_NOLOAD             EXT4_MOUNT_NOLOAD
- #define EXT2_MOUNT_ABORT              EXT4_MOUNT_ABORT
- #define EXT2_MOUNT_DATA_FLAGS         EXT4_MOUNT_DATA_FLAGS
diff --git a/lustre/kernel_patches/patches/i_filter_data.patch b/lustre/kernel_patches/patches/i_filter_data.patch
deleted file mode 100644 (file)
index cac3f9b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-The i_filterdata is currently only used by the size-on-mds to store the
-epoch number for the inode.  This could be moved to another field in
-ldiskfs or elsewhere in the inode that isn't used by Lustre callers.
-
-Index: linux-2.6.18-128.1.6/include/linux/fs.h
-===================================================================
---- linux-2.6.18-128.1.6.orig/include/linux/fs.h       2009-04-14 21:05:43.000000000 -0600
-+++ linux-2.6.18-128.1.6/include/linux/fs.h    2009-06-02 23:21:44.000000000 -0600
-@@ -580,6 +580,7 @@
-               struct cdev             *i_cdev;
-       };
-       int                     i_cindex;
-+      void                    *i_filterdata;
-       __u32                   i_generation;
diff --git a/lustre/kernel_patches/patches/jbd-slab-race-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd-slab-race-2.6-rhel5.patch
deleted file mode 100644 (file)
index 0a11f74..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-kmem_cache_create: duplicate cache jbd_4k
-
-The jbd slab cache creation/deletion is racey.  If multiple jbd based
-filesystems are mounted concurrently, and there are no other jbd based
-filesystems already mounted.  Then we can race creating the slab caches
-since jbd_slab[] is not locked.  This is not commonly observed because
-typically /root is mounted early with a jbd based filesystem making the
-race impossible.  On our diskless systems /root does not use the jbd
-but we do have attached storage which does, and which is mounted in
-parallel.  Basically our setup is similiar to what may be found in a
-NAS style appliance.
-
-This patch wraps all modifications to jbd_slab[] in the jbd_slab_lock
-to prevent this above race.
-
-LLNL Bug 291
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-
-Index: linux+rh+chaos/fs/jbd/journal.c
-===================================================================
---- linux+rh+chaos.orig/fs/jbd/journal.c
-+++ linux+rh+chaos/fs/jbd/journal.c
-@@ -1979,6 +1979,7 @@ void * __jbd_kmalloc (const char *where,
- #define JBD_MAX_SLABS 5
- #define JBD_SLAB_INDEX(size)  (size >> 11)
-+static DECLARE_RWSEM(jbd_slab_lock); /* protect jbd_slab[] */
- static kmem_cache_t *jbd_slab[JBD_MAX_SLABS];
- static const char *jbd_slab_names[JBD_MAX_SLABS] = {
-       "jbd_1k", "jbd_2k", "jbd_4k", NULL, "jbd_8k"
-@@ -1988,24 +1989,27 @@ static void journal_destroy_jbd_slabs(vo
- {
-       int i;
-+      down_write(&jbd_slab_lock);
-       for (i = 0; i < JBD_MAX_SLABS; i++) {
-               if (jbd_slab[i])
-                       kmem_cache_destroy(jbd_slab[i]);
-               jbd_slab[i] = NULL;
-       }
-+      up_write(&jbd_slab_lock);
- }
- static int journal_create_jbd_slab(size_t slab_size)
- {
--      int i = JBD_SLAB_INDEX(slab_size);
-+      int rc = 0, i = JBD_SLAB_INDEX(slab_size);
-       BUG_ON(i >= JBD_MAX_SLABS);
-       /*
-        * Check if we already have a slab created for this size
-        */
-+      down_write(&jbd_slab_lock);
-       if (jbd_slab[i])
--              return 0;
-+              goto out_lock;
-       /*
-        * Create a slab and force alignment to be same as slabsize -
-@@ -2016,27 +2020,36 @@ static int journal_create_jbd_slab(size_
-                               slab_size, slab_size, 0, NULL, NULL);
-       if (!jbd_slab[i]) {
-               printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n");
--              return -ENOMEM;
-+              rc = -ENOMEM;
-       }
--      return 0;
-+out_lock:
-+      up_write(&jbd_slab_lock);
-+      return rc;
- }
- void * jbd_slab_alloc(size_t size, gfp_t flags)
- {
-+      void *ptr;
-       int idx;
-+      down_read(&jbd_slab_lock);
-       idx = JBD_SLAB_INDEX(size);
-       BUG_ON(jbd_slab[idx] == NULL);
--      return kmem_cache_alloc(jbd_slab[idx], flags | __GFP_NOFAIL);
-+      ptr = kmem_cache_alloc(jbd_slab[idx], flags | __GFP_NOFAIL);
-+      up_read(&jbd_slab_lock);
-+
-+      return ptr;
- }
- void jbd_slab_free(void *ptr,  size_t size)
- {
-       int idx;
-+      down_read(&jbd_slab_lock);
-       idx = JBD_SLAB_INDEX(size);
-       BUG_ON(jbd_slab[idx] == NULL);
-       kmem_cache_free(jbd_slab[idx], ptr);
-+      up_read(&jbd_slab_lock);
- }
- /*
-