Whamcloud - gitweb
b=18173
authorgirish <girish>
Thu, 22 Jan 2009 07:37:30 +0000 (07:37 +0000)
committergirish <girish>
Thu, 22 Jan 2009 07:37:30 +0000 (07:37 +0000)
i=adilger
i=kalpak

If there is error during mount, MMP should error out correctly

ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch
ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch

index 8362d56..70578d0 100644 (file)
@@ -342,20 +342,20 @@ Index: linux-2.6.9-67.0.22/fs/ext3/super.c
 +      if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_MMP) &&
 +          !(sb->s_flags & MS_RDONLY))
 +              if (ext3_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block)))
-+                      goto failed_mount3;
++                      goto failed_mount2;
 +
        /*
         * The first inode we look at is the journal inode.  Don't try
         * root first: it may be modified in the journal!
-@@ -1877,6 +2194,8 @@ static int ext3_fill_super (struct super
-       return 0;
+@@ -1879,6 +2196,8 @@ static int ext3_fill_super (struct super
  failed_mount3:
-+      if (sbi->s_mmp_tsk)
-+              kthread_stop(sbi->s_mmp_tsk);
        journal_destroy(sbi->s_journal);
  failed_mount2:
++      if (sbi->s_mmp_tsk)
++              kthread_stop(sbi->s_mmp_tsk);
        for (i = 0; i < db_count; i++)
+               brelse(sbi->s_group_desc[i]);
+       kfree(sbi->s_group_desc);
 @@ -2404,6 +2723,11 @@ int ext3_remount (struct super_block * s
                                return ret;
                        if (!ext3_setup_super (sb, es, 0))
index 01a7d12..059ca82 100644 (file)
@@ -1,7 +1,7 @@
-Index: linux-2.6.16.60-0.31/fs/ext3/super.c
+Index: linux-2.6.16.60-0.33/fs/ext3/super.c
 ===================================================================
---- linux-2.6.16.60-0.31.orig/fs/ext3/super.c
-+++ linux-2.6.16.60-0.31/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
 @@ -36,6 +36,8 @@
  #include <linux/namei.h>
  #include <linux/quotaops.h>
@@ -341,20 +341,20 @@ Index: linux-2.6.16.60-0.31/fs/ext3/super.c
 +      if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_MMP) &&
 +          !(sb->s_flags & MS_RDONLY))
 +              if (ext3_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block)))
-+                      goto failed_mount3;
++                      goto failed_mount2;
 +
        /*
         * The first inode we look at is the journal inode.  Don't try
         * root first: it may be modified in the journal!
-@@ -1991,6 +2307,8 @@ cantfind_ext3:
-       goto failed_mount;
+@@ -1993,6 +2309,8 @@ cantfind_ext3:
  failed_mount3:
-+      if (sbi->s_mmp_tsk)
-+              kthread_stop(sbi->s_mmp_tsk);
        journal_destroy(sbi->s_journal);
  failed_mount2:
++      if (sbi->s_mmp_tsk)
++              kthread_stop(sbi->s_mmp_tsk);
        for (i = 0; i < db_count; i++)
+               brelse(sbi->s_group_desc[i]);
+       kfree(sbi->s_group_desc);
 @@ -2463,7 +2781,7 @@ static int ext3_remount (struct super_bl
        unsigned long n_blocks_count = 0;
        unsigned long old_sb_flags;
@@ -376,10 +376,10 @@ Index: linux-2.6.16.60-0.31/fs/ext3/super.c
                }
        }
  #ifdef CONFIG_QUOTA
-Index: linux-2.6.16.60-0.31/include/linux/ext3_fs.h
+Index: linux-2.6.16.60-0.33/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.6.16.60-0.31.orig/include/linux/ext3_fs.h
-+++ linux-2.6.16.60-0.31/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
 @@ -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 */
@@ -457,10 +457,10 @@ Index: linux-2.6.16.60-0.31/include/linux/ext3_fs.h
   * Function prototypes
   */
  
-Index: linux-2.6.16.60-0.31/include/linux/ext3_fs_sb.h
+Index: linux-2.6.16.60-0.33/include/linux/ext3_fs_sb.h
 ===================================================================
---- linux-2.6.16.60-0.31.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.16.60-0.31/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
 @@ -147,6 +147,7 @@ struct ext3_sb_info {
        /* locality groups */
        struct ext3_locality_group *s_locality_groups;