All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: avoid panic for local mounts on corruptions
@ 2009-11-23 20:40 Srinivas Eeda
  2009-11-23 20:54 ` Sunil Mushran
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Eeda @ 2009-11-23 20:40 UTC (permalink / raw)
  To: ocfs2-devel

When a file system is mounted local, it may be enough to remount it read only
on seeing corruptions.

Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
---
 fs/ocfs2/super.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index a3f8871..c1ee5f0 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2487,10 +2487,12 @@ void __ocfs2_abort(struct super_block* sb,
 	 * TODO: This should abort the journal and alert other nodes
 	 * that our slot needs recovery. */
 
-	/* Force a panic(). This stinks, but it's better than letting
-	 * things continue without having a proper hard readonly
-	 * here. */
-	OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
+	/* Force a panic() for clustered mounts. This stinks, but it's
+	 * better than letting things continue withouthaving a proper
+	 * hard readonly here.
+	 * */
+	if (!ocfs2_mount_local(OCFS2_SB(sb)))
+		OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
 	ocfs2_handle_error(sb);
 }
 
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Ocfs2-devel] [PATCH] ocfs2: avoid panic for local mounts on corruptions
  2009-11-23 20:40 [Ocfs2-devel] [PATCH] ocfs2: avoid panic for local mounts on corruptions Srinivas Eeda
@ 2009-11-23 20:54 ` Sunil Mushran
  0 siblings, 0 replies; 2+ messages in thread
From: Sunil Mushran @ 2009-11-23 20:54 UTC (permalink / raw)
  To: ocfs2-devel

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;h=a2f2ddbf2bafdbc7e4f3bbf09439b42c8fee2747

This change was pushed to mainline few months ago.

Srinivas Eeda wrote:
> When a file system is mounted local, it may be enough to remount it read only
> on seeing corruptions.
>
> Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
> ---
>  fs/ocfs2/super.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index a3f8871..c1ee5f0 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -2487,10 +2487,12 @@ void __ocfs2_abort(struct super_block* sb,
>  	 * TODO: This should abort the journal and alert other nodes
>  	 * that our slot needs recovery. */
>  
> -	/* Force a panic(). This stinks, but it's better than letting
> -	 * things continue without having a proper hard readonly
> -	 * here. */
> -	OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
> +	/* Force a panic() for clustered mounts. This stinks, but it's
> +	 * better than letting things continue withouthaving a proper
> +	 * hard readonly here.
> +	 * */
> +	if (!ocfs2_mount_local(OCFS2_SB(sb)))
> +		OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
>  	ocfs2_handle_error(sb);
>  }
>  
>   

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-23 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 20:40 [Ocfs2-devel] [PATCH] ocfs2: avoid panic for local mounts on corruptions Srinivas Eeda
2009-11-23 20:54 ` Sunil Mushran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.