Whamcloud - gitweb
b=19058
authorgirish <girish>
Fri, 1 May 2009 15:23:01 +0000 (15:23 +0000)
committergirish <girish>
Fri, 1 May 2009 15:23:01 +0000 (15:23 +0000)
b=19184
i=adilger,girish
o=Bernd Schubert
o=Brian Behlendorf

ext3_remount() should return correct error code
add locking for creation of jbd_4k slab cache. Only needed for RHEL5 kernel

ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch
ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch
ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch

index f05fc25..f441b91 100644 (file)
@@ -1,7 +1,7 @@
-Index: linux-2.6.16.60-0.33/fs/ext3/super.c
+Index: linux-2.6.16.60-0.37/fs/ext3/super.c
 ===================================================================
 ===================================================================
---- linux-2.6.16.60-0.33.orig/fs/ext3/super.c
-+++ linux-2.6.16.60-0.33/fs/ext3/super.c
+--- linux-2.6.16.60-0.37.orig/fs/ext3/super.c
++++ linux-2.6.16.60-0.37/fs/ext3/super.c
 @@ -36,6 +36,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
 @@ -36,6 +36,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
@@ -380,22 +380,24 @@ Index: linux-2.6.16.60-0.33/fs/ext3/super.c
  #ifdef CONFIG_QUOTA
        int i;
  #endif
  #ifdef CONFIG_QUOTA
        int i;
  #endif
-@@ -2547,6 +2881,11 @@ static int ext3_remount (struct super_bl
+@@ -2547,6 +2881,13 @@ static int ext3_remount (struct super_bl
                        }
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
                        }
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
-+                                              le64_to_cpu(es->s_mmp_block)))
++                                              le64_to_cpu(es->s_mmp_block))) {
++                                      err = -EROFS;
 +                                      goto restore_opts;
 +                                      goto restore_opts;
++                              }
                }
        }
  #ifdef CONFIG_QUOTA
                }
        }
  #ifdef CONFIG_QUOTA
-Index: linux-2.6.16.60-0.33/include/linux/ext3_fs.h
+Index: linux-2.6.16.60-0.37/include/linux/ext3_fs.h
 ===================================================================
 ===================================================================
---- linux-2.6.16.60-0.33.orig/include/linux/ext3_fs.h
-+++ linux-2.6.16.60-0.33/include/linux/ext3_fs.h
+--- linux-2.6.16.60-0.37.orig/include/linux/ext3_fs.h
++++ linux-2.6.16.60-0.37/include/linux/ext3_fs.h
 @@ -597,13 +597,17 @@ struct ext3_super_block {
        __le32  s_first_meta_bg;        /* First metablock block group */
        __le32  s_mkfs_time;            /* When the filesystem was created */
 @@ -597,13 +597,17 @@ struct ext3_super_block {
        __le32  s_first_meta_bg;        /* First metablock block group */
        __le32  s_mkfs_time;            /* When the filesystem was created */
@@ -473,10 +475,10 @@ Index: linux-2.6.16.60-0.33/include/linux/ext3_fs.h
   * Function prototypes
   */
  
   * Function prototypes
   */
  
-Index: linux-2.6.16.60-0.33/include/linux/ext3_fs_sb.h
+Index: linux-2.6.16.60-0.37/include/linux/ext3_fs_sb.h
 ===================================================================
 ===================================================================
---- linux-2.6.16.60-0.33.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.16.60-0.33/include/linux/ext3_fs_sb.h
+--- linux-2.6.16.60-0.37.orig/include/linux/ext3_fs_sb.h
++++ linux-2.6.16.60-0.37/include/linux/ext3_fs_sb.h
 @@ -147,6 +147,7 @@ struct ext3_sb_info {
        /* locality groups */
        struct ext3_locality_group *s_locality_groups;
 @@ -147,6 +147,7 @@ struct ext3_sb_info {
        /* locality groups */
        struct ext3_locality_group *s_locality_groups;
index 80a3e71..c5875a6 100644 (file)
@@ -1,7 +1,7 @@
-Index: linux-2.6.18-92.1.22/fs/ext3/super.c
+Index: linux-2.6.18-128.1.6/fs/ext3/super.c
 ===================================================================
 ===================================================================
---- linux-2.6.18-92.1.22.orig/fs/ext3/super.c
-+++ linux-2.6.18-92.1.22/fs/ext3/super.c
+--- linux-2.6.18-128.1.6.orig/fs/ext3/super.c
++++ linux-2.6.18-128.1.6/fs/ext3/super.c
 @@ -35,6 +35,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
 @@ -35,6 +35,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
@@ -11,7 +11,7 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
  
  #include <asm/uaccess.h>
  
  
  #include <asm/uaccess.h>
  
-@@ -435,6 +437,8 @@ static void ext3_put_super (struct super
+@@ -440,6 +442,8 @@ static void ext3_put_super (struct super
                invalidate_bdev(sbi->journal_bdev, 0);
                ext3_blkdev_remove(sbi);
        }
                invalidate_bdev(sbi->journal_bdev, 0);
                ext3_blkdev_remove(sbi);
        }
@@ -20,7 +20,7 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
        if (sbi->s_dev_proc) {
                remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3);
                sbi->s_dev_proc = NULL;
        if (sbi->s_dev_proc) {
                remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3);
                sbi->s_dev_proc = NULL;
-@@ -1543,6 +1547,329 @@ static ext3_fsblk_t descriptor_loc(struc
+@@ -1548,6 +1552,329 @@ static ext3_fsblk_t descriptor_loc(struc
        return (has_super + ext3_group_first_block_no(sb, bg));
  }
  
        return (has_super + ext3_group_first_block_no(sb, bg));
  }
  
@@ -350,7 +350,7 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
  
  static int ext3_fill_super (struct super_block *sb, void *data, int silent)
  {
  
  static int ext3_fill_super (struct super_block *sb, void *data, int silent)
  {
-@@ -1875,6 +2202,11 @@ static int ext3_fill_super (struct super
+@@ -1880,6 +2207,11 @@ static int ext3_fill_super (struct super
                          EXT3_HAS_INCOMPAT_FEATURE(sb,
                                    EXT3_FEATURE_INCOMPAT_RECOVER));
  
                          EXT3_HAS_INCOMPAT_FEATURE(sb,
                                    EXT3_FEATURE_INCOMPAT_RECOVER));
  
@@ -362,7 +362,7 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
        /*
         * The first inode we look at is the journal inode.  Don't try
         * root first: it may be modified in the journal!
        /*
         * The first inode we look at is the journal inode.  Don't try
         * root first: it may be modified in the journal!
-@@ -2007,6 +2339,8 @@ cantfind_ext3:
+@@ -2012,6 +2344,8 @@ cantfind_ext3:
  failed_mount4:
        journal_destroy(sbi->s_journal);
  failed_mount3:
  failed_mount4:
        journal_destroy(sbi->s_journal);
  failed_mount3:
@@ -371,7 +371,7 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
        percpu_counter_destroy(&sbi->s_freeblocks_counter);
        percpu_counter_destroy(&sbi->s_freeinodes_counter);
        percpu_counter_destroy(&sbi->s_dirs_counter);
        percpu_counter_destroy(&sbi->s_freeblocks_counter);
        percpu_counter_destroy(&sbi->s_freeinodes_counter);
        percpu_counter_destroy(&sbi->s_dirs_counter);
-@@ -2482,7 +2816,7 @@ static int ext3_remount (struct super_bl
+@@ -2497,7 +2831,7 @@ static int ext3_remount (struct super_bl
        ext3_fsblk_t n_blocks_count = 0;
        unsigned long old_sb_flags;
        struct ext3_mount_options old_opts;
        ext3_fsblk_t n_blocks_count = 0;
        unsigned long old_sb_flags;
        struct ext3_mount_options old_opts;
@@ -380,22 +380,24 @@ Index: linux-2.6.18-92.1.22/fs/ext3/super.c
  #ifdef CONFIG_QUOTA
        int i;
  #endif
  #ifdef CONFIG_QUOTA
        int i;
  #endif
-@@ -2580,6 +2914,11 @@ static int ext3_remount (struct super_bl
+@@ -2595,6 +2929,13 @@ static int ext3_remount (struct super_bl
                        }
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
                        }
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
-+                                              le64_to_cpu(es->s_mmp_block)))
++                                              le64_to_cpu(es->s_mmp_block))) {
++                                      err = -EROFS;
 +                                      goto restore_opts;
 +                                      goto restore_opts;
++                              }
                }
        }
  #ifdef CONFIG_QUOTA
                }
        }
  #ifdef CONFIG_QUOTA
-Index: linux-2.6.18-92.1.22/include/linux/ext3_fs.h
+Index: linux-2.6.18-128.1.6/include/linux/ext3_fs.h
 ===================================================================
 ===================================================================
---- linux-2.6.18-92.1.22.orig/include/linux/ext3_fs.h
-+++ linux-2.6.18-92.1.22/include/linux/ext3_fs.h
+--- linux-2.6.18-128.1.6.orig/include/linux/ext3_fs.h
++++ linux-2.6.18-128.1.6/include/linux/ext3_fs.h
 @@ -594,13 +594,17 @@ struct ext3_super_block {
        __le32  s_first_meta_bg;        /* First metablock block group */
        __le32  s_mkfs_time;            /* When the filesystem was created */
 @@ -594,13 +594,17 @@ struct ext3_super_block {
        __le32  s_first_meta_bg;        /* First metablock block group */
        __le32  s_mkfs_time;            /* When the filesystem was created */
@@ -473,10 +475,10 @@ Index: linux-2.6.18-92.1.22/include/linux/ext3_fs.h
   * Function prototypes
   */
  
   * Function prototypes
   */
  
-Index: linux-2.6.18-92.1.22/include/linux/ext3_fs_sb.h
+Index: linux-2.6.18-128.1.6/include/linux/ext3_fs_sb.h
 ===================================================================
 ===================================================================
---- linux-2.6.18-92.1.22.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.18-92.1.22/include/linux/ext3_fs_sb.h
+--- linux-2.6.18-128.1.6.orig/include/linux/ext3_fs_sb.h
++++ linux-2.6.18-128.1.6/include/linux/ext3_fs_sb.h
 @@ -158,6 +158,7 @@ struct ext3_sb_info {
        /* locality groups */
        struct ext3_locality_group *s_locality_groups;
 @@ -158,6 +158,7 @@ struct ext3_sb_info {
        /* locality groups */
        struct ext3_locality_group *s_locality_groups;
index 0a15100..b6df0f2 100644 (file)
@@ -380,15 +380,17 @@ Index: linux-2.6.22.14/fs/ext3/super.c
  #ifdef CONFIG_QUOTA
        int i;
  #endif
  #ifdef CONFIG_QUOTA
        int i;
  #endif
-@@ -2580,6 +2914,11 @@ static int ext3_remount (struct super_bl
+@@ -2580,6 +2914,13 @@ static int ext3_remount (struct super_bl
                                goto restore_opts;
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
                                goto restore_opts;
                        if (!ext3_setup_super (sb, es, 0))
                                sb->s_flags &= ~MS_RDONLY;
 +                      if (EXT3_HAS_INCOMPAT_FEATURE(sb,
 +                                                  EXT3_FEATURE_INCOMPAT_MMP))
 +                              if (ext3_multi_mount_protect(sb,
-+                                              le64_to_cpu(es->s_mmp_block)))
++                                              le64_to_cpu(es->s_mmp_block))) {
++                                      err = -EROFS;
 +                                      goto restore_opts;
 +                                      goto restore_opts;
++                              }
                }
        }
  #ifdef CONFIG_QUOTA
                }
        }
  #ifdef CONFIG_QUOTA