* [Cluster-devel] [GFS2 Patch] bz 450156 - kernel panic mounting volume
@ 2008-06-09 17:08 Bob Peterson
2008-06-11 12:17 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2008-06-09 17:08 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This patch fixes bugzilla bug 450156.
This started with a not-too-improbable mount failure because the
locking protocol was never set back to its proper "lock_dlm" after the
system was rebooted in the middle of a gfs2_fsck. That left a
(purposely) invalid locking protocol in the superblock, which caused an
error when the file system was mounted the next time.
When there's an error mounting, vfs calls DQUOT_OFF, which calls
vfs_quota_off which calls gfs2_sync_fs. Next, gfs2_sync_fs calls
gfs2_log_flush passing s_fs_info. But due to the error, s_fs_info
had been previously set to NULL, and so we have the kernel oops.
My solution in this patch is to test for the NULL value before passing
it. I tested this patch and it fixes the problem.
I believe the problem was caused due to changes in what the DQUOTA_OFF
macro does in newer kernels. I could not recreate the
problem on a RHEL kernel and don't believe this affects RHEL.
Regards,
Bob Peterson
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
--
fs/gfs2/ops_super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 0b7cc92..6690792 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -155,7 +155,7 @@ static void gfs2_write_super(struct super_block *sb)
static int gfs2_sync_fs(struct super_block *sb, int wait)
{
sb->s_dirt = 0;
- if (wait)
+ if (wait && sb->s_fs_info)
gfs2_log_flush(sb->s_fs_info, NULL);
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [GFS2 Patch] bz 450156 - kernel panic mounting volume
2008-06-09 17:08 [Cluster-devel] [GFS2 Patch] bz 450156 - kernel panic mounting volume Bob Peterson
@ 2008-06-11 12:17 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2008-06-11 12:17 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Now in the GFS2 -nmw git tree. Thanks,
Steve.
On Mon, 2008-06-09 at 12:08 -0500, Bob Peterson wrote:
> Hi,
>
> This patch fixes bugzilla bug 450156.
>
> This started with a not-too-improbable mount failure because the
> locking protocol was never set back to its proper "lock_dlm" after the
> system was rebooted in the middle of a gfs2_fsck. That left a
> (purposely) invalid locking protocol in the superblock, which caused an
> error when the file system was mounted the next time.
>
> When there's an error mounting, vfs calls DQUOT_OFF, which calls
> vfs_quota_off which calls gfs2_sync_fs. Next, gfs2_sync_fs calls
> gfs2_log_flush passing s_fs_info. But due to the error, s_fs_info
> had been previously set to NULL, and so we have the kernel oops.
>
> My solution in this patch is to test for the NULL value before passing
> it. I tested this patch and it fixes the problem.
>
> I believe the problem was caused due to changes in what the DQUOTA_OFF
> macro does in newer kernels. I could not recreate the
> problem on a RHEL kernel and don't believe this affects RHEL.
>
> Regards,
>
> Bob Peterson
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
> fs/gfs2/ops_super.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
> index 0b7cc92..6690792 100644
> --- a/fs/gfs2/ops_super.c
> +++ b/fs/gfs2/ops_super.c
> @@ -155,7 +155,7 @@ static void gfs2_write_super(struct super_block *sb)
> static int gfs2_sync_fs(struct super_block *sb, int wait)
> {
> sb->s_dirt = 0;
> - if (wait)
> + if (wait && sb->s_fs_info)
> gfs2_log_flush(sb->s_fs_info, NULL);
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-11 12:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 17:08 [Cluster-devel] [GFS2 Patch] bz 450156 - kernel panic mounting volume Bob Peterson
2008-06-11 12:17 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).