From b9b8287ac064dee506041f952e1b529a53f3258e Mon Sep 17 00:00:00 2001 From: kalpak Date: Sat, 13 Dec 2008 11:17:21 +0000 Subject: [PATCH] b=17908 i=adilger i=girish stop kmmpd if mount fails --- .../patches/ext3-mmp-2.6-rhel4.patch | 11 +++++++- .../patches/ext3-mmp-2.6-sles10.patch | 13 +++++++-- .../patches/ext3-mmp-2.6.18-vanilla.patch | 13 +++++++-- .../patches/ext3-mmp-2.6.22-vanilla.patch | 31 ++++++++++++++-------- 4 files changed, 52 insertions(+), 16 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch index 080bff0..8362d56 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-rhel4.patch @@ -347,7 +347,16 @@ Index: linux-2.6.9-67.0.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! -@@ -2404,6 +2721,11 @@ int ext3_remount (struct super_block * s +@@ -1877,6 +2194,8 @@ static int ext3_fill_super (struct super + return 0; + + failed_mount3: ++ if (sbi->s_mmp_tsk) ++ kthread_stop(sbi->s_mmp_tsk); + journal_destroy(sbi->s_journal); + failed_mount2: + for (i = 0; i < db_count; i++) +@@ -2404,6 +2723,11 @@ int ext3_remount (struct super_block * s return ret; if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch index 0cf467a..01a7d12 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6-sles10.patch @@ -346,7 +346,16 @@ Index: linux-2.6.16.60-0.31/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! -@@ -2463,7 +2779,7 @@ static int ext3_remount (struct super_bl +@@ -1991,6 +2307,8 @@ cantfind_ext3: + goto failed_mount; + + failed_mount3: ++ if (sbi->s_mmp_tsk) ++ kthread_stop(sbi->s_mmp_tsk); + journal_destroy(sbi->s_journal); + failed_mount2: + for (i = 0; i < db_count; i++) +@@ -2463,7 +2781,7 @@ static int ext3_remount (struct super_bl unsigned long n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; @@ -355,7 +364,7 @@ Index: linux-2.6.16.60-0.31/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2547,6 +2863,11 @@ static int ext3_remount (struct super_bl +@@ -2547,6 +2865,11 @@ static int ext3_remount (struct super_bl } if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch index 1914c9a..1c2cd39 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.18-vanilla.patch @@ -346,7 +346,16 @@ Index: linux-2.6.18-92.1.17/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! -@@ -2482,7 +2798,7 @@ static int ext3_remount (struct super_bl +@@ -2007,6 +2323,8 @@ cantfind_ext3: + failed_mount4: + journal_destroy(sbi->s_journal); + failed_mount3: ++ if (sbi->s_mmp_tsk) ++ kthread_stop(sbi->s_mmp_tsk); + percpu_counter_destroy(&sbi->s_freeblocks_counter); + percpu_counter_destroy(&sbi->s_freeinodes_counter); + percpu_counter_destroy(&sbi->s_dirs_counter); +@@ -2482,7 +2800,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; @@ -355,7 +364,7 @@ Index: linux-2.6.18-92.1.17/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2580,6 +2896,11 @@ static int ext3_remount (struct super_bl +@@ -2580,6 +2898,11 @@ static int ext3_remount (struct super_bl } if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; diff --git a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch index e041985..ece021c 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mmp-2.6.22-vanilla.patch @@ -1,7 +1,7 @@ -Index: linux-2.6.22.19/fs/ext3/super.c +Index: linux-2.6.22.14/fs/ext3/super.c =================================================================== ---- linux-2.6.22.19.orig/fs/ext3/super.c -+++ linux-2.6.22.19/fs/ext3/super.c +--- linux-2.6.22.14.orig/fs/ext3/super.c ++++ linux-2.6.22.14/fs/ext3/super.c @@ -35,6 +35,8 @@ #include #include @@ -346,7 +346,16 @@ Index: linux-2.6.22.19/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! -@@ -2482,7 +2798,7 @@ static int ext3_remount (struct super_bl +@@ -2007,6 +2323,8 @@ cantfind_ext3: + failed_mount4: + journal_destroy(sbi->s_journal); + failed_mount3: ++ if (sbi->s_mmp_tsk) ++ kthread_stop(sbi->s_mmp_tsk); + percpu_counter_destroy(&sbi->s_freeblocks_counter); + percpu_counter_destroy(&sbi->s_freeinodes_counter); + percpu_counter_destroy(&sbi->s_dirs_counter); +@@ -2482,7 +2800,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; @@ -355,7 +364,7 @@ Index: linux-2.6.22.19/fs/ext3/super.c #ifdef CONFIG_QUOTA int i; #endif -@@ -2580,6 +2896,11 @@ static int ext3_remount (struct super_bl +@@ -2580,6 +2898,11 @@ static int ext3_remount (struct super_bl goto restore_opts; if (!ext3_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; @@ -367,10 +376,10 @@ Index: linux-2.6.22.19/fs/ext3/super.c } } #ifdef CONFIG_QUOTA -Index: linux-2.6.22.19/include/linux/ext3_fs.h +Index: linux-2.6.22.14/include/linux/ext3_fs.h =================================================================== ---- linux-2.6.22.19.orig/include/linux/ext3_fs.h -+++ linux-2.6.22.19/include/linux/ext3_fs.h +--- linux-2.6.22.14.orig/include/linux/ext3_fs.h ++++ linux-2.6.22.14/include/linux/ext3_fs.h @@ -608,13 +608,17 @@ struct ext3_super_block { __le32 s_first_meta_bg; /* First metablock block group */ __le32 s_mkfs_time; /* When the filesystem was created */ @@ -448,10 +457,10 @@ Index: linux-2.6.22.19/include/linux/ext3_fs.h * Function prototypes */ -Index: linux-2.6.22.19/include/linux/ext3_fs_sb.h +Index: linux-2.6.22.14/include/linux/ext3_fs_sb.h =================================================================== ---- linux-2.6.22.19.orig/include/linux/ext3_fs_sb.h -+++ linux-2.6.22.19/include/linux/ext3_fs_sb.h +--- linux-2.6.22.14.orig/include/linux/ext3_fs_sb.h ++++ linux-2.6.22.14/include/linux/ext3_fs_sb.h @@ -158,6 +158,7 @@ struct ext3_sb_info { /* locality groups */ struct ext3_locality_group *s_locality_groups; -- 1.8.3.1