<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
body
        {line-height:1.5}
blockquote
        {margin-top:0px;
        margin-bottom:0px;
        margin-left:0.5em}
p
        {margin-top:0px;
        margin-bottom:0px}
body
        {font-size:16pt;
        font-family:微软雅黑;
        color:rgb(0,0,0);
        line-height:1.5}
-->
</style>
</head>
<body>
<div><span></span>
<div><font size="3"><span style="line-height:19px">OCFS2 is often used in high-availaibility systems,&nbsp;</span></font><span style="background-color:window; font-size:medium; line-height:20px; widows:1">This patch&nbsp;</span><span style="background-color:window; font-size:medium; line-height:20px; widows:1">enha</span><font size="3"><span style="background-color:rgb(255,255,255)"><span style="line-height:20px; widows:1">nces</span><span style="line-height:20px; widows:1">&nbsp;robustness</span><span style="line-height:19px">&nbsp;for&nbsp;</span><span style="line-height:normal">the
 filesystem.</span></span></font></div>
<div style="font-size:16px"><font size="2" style="font-size:16px"><span style="line-height:19px">but storage network is unstab</span><span style="line-height:19px">le,</span></font><span style="background-color:window; line-height:19px">it still triggers a
 panic,&nbsp;</span><span style="background-color:window; line-height:19px">such as&nbsp;</span><span style="line-height:1.5; background-color:window">ocfs2_start_trans -&gt;&nbsp;</span>__ocfs2_abort<span style="line-height:1.5; background-color:window">&nbsp;-&gt;panic.</span></div>
<div><font size="3"><span style="background-color:rgb(255,255,255)"><span style="line-height:19px">The '</span></span></font><span style="font-size:16px; line-height:24px">s_mount_opt'</span><font size="3"><span style="background-color:rgb(255,255,255)"><span style="line-height:19px">&nbsp;should&nbsp;</span><span style="line-height:19px">depend
 on the mount option set, If&nbsp;</span></span></font><span style="font-size:medium; line-height:19px">errors=continue</span><font size="3"><span style="background-color:rgb(255,255,255)"><span style="line-height:19px">&nbsp;is set,&nbsp;</span></span></font></div>
<div><font size="3"><span style="background-color:rgb(255,255,255)"><span style="line-height:19px">mark
</span></span></font><span style="font-size:16px; line-height:24px; background-color:window">as a EIO error, change
</span><span style="font-size:16px; line-height:24px; background-color:window">OCFS2_MOUNT_ERRORS_PANIC to&nbsp;</span><span style="font-size:16px; line-height:1.5; background-color:window">OCFS2_MOUNT_ERRORS_CONT</span><span style="font-size:16pt; background-color:window; line-height:19px"><font size="3">&nbsp;in&nbsp;</font></span><span style="font-size:16px; line-height:1.5">__ocfs2_abort;</span></div>
<div><font size="3"><span style="line-height:24px">it's better than forcing a panic&nbsp;</span><span style="line-height:24px">without&nbsp;</span><span style="line-height:normal">decreasing availability,</span></font><span style="font-size:medium; line-height:19px; background-color:window">errors=continue
 seems be well to me.</span></div>
<div style="font-size:16px"><span style="font-size:small; line-height:19px"><br>
</span></div>
<div style="font-size:16px"><font size="2" style="font-size:16px"><span style="line-height:1.5">Finally, any feedback about this process&nbsp;</span><span style="line-height:1.5">(positive or negative) would be greatly appreciated.&nbsp;</span></font></div>
<div>
<pre><div style="white-space:normal; font-family:微软雅黑"><span style="font-size:12px">&nbsp; &nbsp;Aug 11 11:32:25 cvknode73 kernel: [678904.787906] (pool,23256,12):ocfs2_start_trans:367 ERROR: status = -30</span></div><blockquote style="white-space:normal; font-family:微软雅黑"><div class="FoxDiv20150811115357296325" style="position:static!important"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825046] CPU: 12 PID: 23256 Comm: pool Tainted: GF W IO 3.13.6 #1&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825050] Hardware name: HP ProLiant BL460c G7, BIOS I27 12/03/2012&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825054] ffffffffffffffe2 ffff88108c945a88 ffffffff81750690 ffff88180bacfff0&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825064] ffff88174196d000 ffff88108c945ad8 ffffffffa052f667 ffffffffffffffe2&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825072] 0000000000001000 ffff88108c945b58 ffff88175e870000 ffff8811ada4f000&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825087] Call Trace:&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825103] [&lt;ffffffff81750690&gt;] dump_stack&#43;0x46/0x58&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825154] [&lt;ffffffffa052f667&gt;] ocfs2_start_trans&#43;0x1d7/0x200 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825183] [&lt;ffffffffa0505b60&gt;] ocfs2_write_begin_nolock&#43;0xda0/0x1c70 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825216] [&lt;ffffffffa052b7cb&gt;] ? ocfs2_read_inode_block_full&#43;0x3b/0x60 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825248] [&lt;ffffffffa051a82f&gt;] ? ocfs2_inode_lock_full_nested&#43;0x52f/0xc60 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825277] [&lt;ffffffffa0516060&gt;] ? ocfs2_should_refresh_lock_res&#43;0x80/0x190 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825304] [&lt;ffffffffa0506b36&gt;] ocfs2_write_begin&#43;0x106/0x230 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825330] [&lt;ffffffffa05180ab&gt;] ? __ocfs2_cluster_unlock.isra.27&#43;0x9b/0xe0 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825342] [&lt;ffffffff8115342b&gt;] generic_file_buffered_write&#43;0xfb/0x280&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825370] [&lt;ffffffffa051a1c5&gt;] ? ocfs2_rw_lock&#43;0x75/0x1b0 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825398] [&lt;ffffffffa0527f3f&gt;] ocfs2_file_aio_write&#43;0x79f/0x830 [ocfs2]&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825407] [&lt;ffffffff811c14ba&gt;] do_sync_write&#43;0x5a/0x90&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825413] [&lt;ffffffff811c1fc5&gt;] vfs_write&#43;0xc5/0x1f0&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825418] [&lt;ffffffff811c24c2&gt;] SyS_write&#43;0x52/0xa0&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825426] [&lt;ffffffff8176106d&gt;] system_call_fastpath&#43;0x1a/0x1f&nbsp;</span><br style="line-height:18px; font-size:12px"><span style="font-size:12px; line-height:18px">Aug 11 11:32:25 cvknode73 kernel: [678904.825431] OCFS2: abort (device sdu): ocfs2_start_trans: Detected aborted journal&nbsp;</span></div></blockquote></pre>
</div>
</div>
<div><br>
</div>
<hr color="#b5c4df" size="1" align="left" style="width:210px; height:1px">
<div><span>
<div style="margin:10px; font-family:verdana; font-size:10pt">
<div>zhangguanghui</div>
</div>
</span></div>
<blockquote style="margin-top:0px; margin-bottom:0px; margin-left:0.5em">
<div>
<div class="FoxDiv20151014150315911581">
<p><font size="2"><br>
Message: 8<br>
Date: Fri, 28 Aug 2015 16:45:44 -0700<br>
From: Mark Fasheh &lt;mfasheh@suse.de&gt;<br>
Subject: Re: [Ocfs2-devel] [patch 04/28] ocfs2: add errors=continue<br>
To: akpm@linux-foundation.org<br>
Cc: ocfs2-devel@oss.oracle.com, rgoldwyn@suse.com<br>
Message-ID: &lt;20150828234544.GN1145@wotan.suse.de&gt;<br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Wed, Aug 26, 2015 at 03:11:29PM -0700, Andrew Morton wrote:<br>
&gt; From: Goldwyn Rodrigues &lt;rgoldwyn@suse.de&gt;<br>
&gt; Subject: ocfs2: add errors=continue<br>
&gt;<br>
&gt; OCFS2 is often used in high-availaibility systems.&nbsp; However, ocfs2<br>
&gt; converts the filesystem to read-only at the drop of the hat.&nbsp; This may not<br>
&gt; be necessary, since turning the filesystem read-only would affect other<br>
&gt; running processes as well, decreasing availability.<br>
&gt;<br>
&gt; This attempt is to add errors=continue, which would return the EIO to the<br>
&gt; calling process and terminate furhter processing so that the filesystem is<br>
&gt; not corrupted further.&nbsp; However, the filesystem is not converted to<br>
&gt; read-only.<br>
&gt;<br>
&gt; As a future plan, I intend to create a small utility or extend fsck.ocfs2<br>
&gt; to fix small errors such as in the inode.&nbsp; The input to the utility such<br>
&gt; as the inode can come from the kernel logs so we don't have to schedule a<br>
&gt; downtime for fixing small-enough errors.<br>
&gt;<br>
&gt; The patch changes the ocfs2_error to return an error.&nbsp; The error returned<br>
&gt; depends on the mount option set.&nbsp; If none is set, the default is to turn<br>
&gt; the filesystem read-only.<br>
&gt;<br>
&gt; Perhaps errors=continue is not the best option name.&nbsp; Historically it is<br>
&gt; used for making an attempt to progress in the current process itself.<br>
&gt; Should we call it errors=eio?&nbsp; or errors=killproc?&nbsp; Suggestions/Comments<br>
&gt; welcome.<br>
<br>
errors=continue seems fine to me, thanks for this Goldwyn.<br>
<br>
<br>
&gt;<br>
&gt; Sources are available at:<br>
&gt; <a href="https://github.com/goldwynr/linux/tree/error-cont">https://github.com/goldwynr/linux/tree/error-cont</a><br>
&gt;<br>
&gt; Signed-off-by: Goldwyn Rodrigues &lt;rgoldwyn@suse.com&gt;<br>
&gt; Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;<br>
&gt; Cc: Joel Becker &lt;jlbec@evilplan.org&gt;<br>
&gt; Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;<br>
Reviewed-by: Mark Fasheh &lt;mfasheh@suse.de&gt;<br>
<br>
<br>
&gt; ---<br>
&gt;<br>
&gt;&nbsp; fs/ocfs2/ocfs2.h |&nbsp;&nbsp;&nbsp; 2 &#43;<br>
&gt;&nbsp; fs/ocfs2/super.c |&nbsp;&nbsp; 59 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-------------<br>
&gt;&nbsp; fs/ocfs2/super.h |&nbsp;&nbsp;&nbsp; 2 -<br>
&gt;&nbsp; 3 files changed, 45 insertions(&#43;), 18 deletions(-)<br>
&gt;<br>
&gt; diff -puN fs/ocfs2/ocfs2.h~add-errors=continue fs/ocfs2/ocfs2.h<br>
&gt; --- a/fs/ocfs2/ocfs2.h~add-errors=continue<br>
&gt; &#43;&#43;&#43; a/fs/ocfs2/ocfs2.h<br>
&gt; @@ -286,6 &#43;286,8 @@ enum ocfs2_mount_options<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; OCFS2_MOUNT_HB_GLOBAL = 1 &lt;&lt; 14, /* Global heartbeat */<br>
&gt;&nbsp;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT = 1 &lt;&lt; 15,&nbsp; /* Journal Async Commit */<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; OCFS2_MOUNT_ERRORS_CONT = 1 &lt;&lt; 16, /* Return EIO to the calling process on error */<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; OCFS2_MOUNT_ERRORS_ROFS = 1 &lt;&lt; 17, /* Change filesystem to read-only on error */<br>
&gt;&nbsp; };<br>
&gt;&nbsp;<br>
&gt;&nbsp; #define OCFS2_OSB_SOFT_RO&nbsp;&nbsp;&nbsp; 0x0001<br>
&gt; diff -puN fs/ocfs2/super.c~add-errors=continue fs/ocfs2/super.c<br>
&gt; --- a/fs/ocfs2/super.c~add-errors=continue<br>
&gt; &#43;&#43;&#43; a/fs/ocfs2/super.c<br>
&gt; @@ -192,6 &#43;192,7 @@ enum {<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Opt_resv_level,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Opt_dir_resv_level,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Opt_journal_async_commit,<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; Opt_err_cont,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Opt_err,<br>
&gt;&nbsp; };<br>
&gt;&nbsp;<br>
&gt; @@ -224,6 &#43;225,7 @@ static const match_table_t tokens = {<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {Opt_resv_level, &quot;resv_level=%u&quot;},<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {Opt_dir_resv_level, &quot;dir_resv_level=%u&quot;},<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {Opt_journal_async_commit, &quot;journal_async_commit&quot;},<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; {Opt_err_cont, &quot;errors=continue&quot;},<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {Opt_err, NULL}<br>
&gt;&nbsp; };<br>
&gt;&nbsp;<br>
&gt; @@ -1330,10 &#43;1332,19 @@ static int ocfs2_parse_options(struct su<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt |= OCFS2_MOUNT_NOINTR;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case Opt_err_panic:<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_CONT;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_ROFS;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case Opt_err_ro:<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_CONT;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_PANIC;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt |= OCFS2_MOUNT_ERRORS_ROFS;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case Opt_err_cont:<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_ROFS;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_ERRORS_PANIC;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt |= OCFS2_MOUNT_ERRORS_CONT;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case Opt_data_ordered:<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mopt-&gt;mount_opt &amp;= ~OCFS2_MOUNT_DATA_WRITEBACK;<br>
&gt; @@ -1530,6 &#43;1541,8 @@ static int ocfs2_show_options(struct seq<br>
&gt;&nbsp;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if (opts &amp; OCFS2_MOUNT_ERRORS_PANIC)<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seq_printf(s, &quot;,errors=panic&quot;);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; else if (opts &amp; OCFS2_MOUNT_ERRORS_CONT)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seq_printf(s, &quot;,errors=continue&quot;);<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; else<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seq_printf(s, &quot;,errors=remount-ro&quot;);<br>
&gt;&nbsp;<br>
&gt; @@ -2539,31 &#43;2552,43 @@ static void ocfs2_delete_osb(struct ocfs<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; memset(osb, 0, sizeof(struct ocfs2_super));<br>
&gt;&nbsp; }<br>
&gt;&nbsp;<br>
&gt; -/* Put OCFS2 into a readonly state, or (if the user specifies it),<br>
&gt; - * panic(). We do not support continue-on-error operation. */<br>
&gt; -static void ocfs2_handle_error(struct super_block *sb)<br>
&gt; &#43;/* Depending on the mount option passed, perform one of the following:<br>
&gt; &#43; * Put OCFS2 into a readonly state (default)<br>
&gt; &#43; * Return EIO so that only the process errs<br>
&gt; &#43; * Fix the error as if fsck.ocfs2 -y<br>
&gt; &#43; * panic<br>
&gt; &#43; */<br>
&gt; &#43;static int ocfs2_handle_error(struct super_block *sb)<br>
&gt;&nbsp; {<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; struct ocfs2_super *osb = OCFS2_SB(sb);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; int rv = 0;<br>
&gt; &#43;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_set_osb_flag(osb, OCFS2_OSB_ERROR_FS);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; pr_crit(&quot;On-disk corruption discovered. &quot;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Please run fsck.ocfs2 once the filesystem is unmounted.\n&quot;);<br>
&gt;&nbsp;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; if (osb-&gt;s_mount_opt &amp; OCFS2_MOUNT_ERRORS_PANIC)<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; if (osb-&gt;s_mount_opt &amp; OCFS2_MOUNT_ERRORS_PANIC) {<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panic(&quot;OCFS2: (device %s): panic forced after error\n&quot;,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sb-&gt;s_id);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; } else if (osb-&gt;s_mount_opt &amp; OCFS2_MOUNT_ERRORS_CONT) {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pr_crit(&quot;OCFS2: Returning error to the calling process.\n&quot;);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rv = -EIO;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; } else { /* default option */<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rv = -EROFS;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (sb-&gt;s_flags &amp; MS_RDONLY &amp;&amp;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ocfs2_is_soft_readonly(osb) ||<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_is_hard_readonly(osb)))<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return rv;<br>
&gt;&nbsp;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_set_osb_flag(osb, OCFS2_OSB_ERROR_FS);<br>
&gt; -<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; if (sb-&gt;s_flags &amp; MS_RDONLY &amp;&amp;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (ocfs2_is_soft_readonly(osb) ||<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ocfs2_is_hard_readonly(osb)))<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pr_crit(&quot;OCFS2: File system is now read-only.\n&quot;);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sb-&gt;s_flags |= MS_RDONLY;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_set_ro_flag(osb, 0);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt;&nbsp;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; printk(KERN_CRIT &quot;File system is now read-only due to the potential &quot;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;of on-disk corruption. Please run fsck.ocfs2 once the file &quot;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;system is unmounted.\n&quot;);<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; sb-&gt;s_flags |= MS_RDONLY;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_set_ro_flag(osb, 0);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; return rv;<br>
&gt;&nbsp; }<br>
&gt;&nbsp;<br>
&gt; -void __ocfs2_error(struct super_block *sb, const char *function,<br>
&gt; &#43;int __ocfs2_error(struct super_block *sb, const char *function,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; const char *fmt, ...)<br>
&gt;&nbsp; {<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; struct va_format vaf;<br>
&gt; @@ -2580,7 &#43;2605,7 @@ void __ocfs2_error(struct super_block *s<br>
&gt;&nbsp;<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; va_end(args);<br>
&gt;&nbsp;<br>
&gt; -&nbsp;&nbsp;&nbsp;&nbsp; ocfs2_handle_error(sb);<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; return ocfs2_handle_error(sb);<br>
&gt;&nbsp; }<br>
&gt;&nbsp;<br>
&gt;&nbsp; /* Handle critical errors. This is intentionally more drastic than<br>
&gt; diff -puN fs/ocfs2/super.h~add-errors=continue fs/ocfs2/super.h<br>
&gt; --- a/fs/ocfs2/super.h~add-errors=continue<br>
&gt; &#43;&#43;&#43; a/fs/ocfs2/super.h<br>
&gt; @@ -32,7 &#43;32,7 @@ int ocfs2_publish_get_mount_state(struct<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; int node_num);<br>
&gt;&nbsp;<br>
&gt;&nbsp; __printf(3, 4)<br>
&gt; -void __ocfs2_error(struct super_block *sb, const char *function,<br>
&gt; &#43;int __ocfs2_error(struct super_block *sb, const char *function,<br>
&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; const char *fmt, ...);<br>
&gt;&nbsp;<br>
&gt;&nbsp; #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)<br>
&gt; _<br>
--<br>
Mark Fasheh<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Ocfs2-devel mailing list<br>
Ocfs2-devel@oss.oracle.com<br>
<a href="https://oss.oracle.com/mailman/listinfo/ocfs2-devel">https://oss.oracle.com/mailman/listinfo/ocfs2-devel</a><br>
<br>
End of Ocfs2-devel Digest, Vol 138, Issue 31<br>
********************************************<br>
</font></p>
</div>
</div>
</blockquote>
<span style="font-size:7.5pt; font-family:华文细黑; color:gray"><span lang="EN-US">-------------------------------------------------------------------------------------------------------------------------------------<br>
</span>本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出<span lang="EN-US"><br>
</span>的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、<span lang="EN-US"><br>
</span>或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本<span lang="EN-US"><br>
</span>邮件!<span lang="EN-US"><br>
</span></span><span lang="EN-US" style="font-size:7.5pt; font-family:&quot;Arial&quot;,&quot;sans-serif&quot;; color:gray">This e-mail and its attachments contain confidential information from H3C, which is
<br>
intended only for the person or entity whose address is listed above. Any use of the
<br>
information contained herein in any way (including, but not limited to, total or partial
<br>
disclosure, reproduction, or dissemination) by persons other than the intended <br>
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
<br>
by phone or email immediately and delete it!</span>
</body>
</html>