<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; }div.foxdiv20160503155310276755 { }body { font-size: 16pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style>
</head>
<body>
<div><span></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;">
<div class="FoxDiv20160503155310276755">
<p><span style="font-size: 13px; background-color: rgba(0, 0, 0, 0);">Hi </span><span style="font-size: small; line-height: 19px; background-color: window;">Joseph</span></p>
<p><font size="2">After a repeated test, </font><font size="2" style="background-color: window;"><span srcinfo="0:1" dstinfo="0:3" paragraphname="paragraph0" issource="false" id="ouHighlight__0_1TO0_3" class="highlighted" style="line-height: normal; widows: 1;">This</span><span id="noHighlight_0.9911661390215158" style="line-height: normal; widows: 1;"> </span><span srcinfo="4:5" dstinfo="14:16" paragraphname="paragraph0" issource="false" id="ouHighlight__4_5TO14_16" class="" style="line-height: normal; widows: 1;"><span style="line-height: 19px; widows: auto;">patch
which </span>may</span><span id="noHighlight_0.9246258228085935" style="line-height: normal; widows: 1;"> </span><span srcinfo="6:7" dstinfo="18:22" paragraphname="paragraph0" issource="false" id="ouHighlight__6_7TO18_22" class="" style="line-height: normal; widows: 1;">solve</span><span id="noHighlight_0.17606931971386075" style="line-height: normal; widows: 1;"> </span><span srcinfo="8:9" dstinfo="24:27" paragraphname="paragraph0" issource="false" id="ouHighlight__8_9TO24_27" class="" style="line-height: normal; widows: 1;">some</span><span id="noHighlight_0.542412874288857" style="line-height: normal; widows: 1;"> </span><span srcinfo="10:11" dstinfo="29:36" paragraphname="paragraph0" issource="false" id="ouHighlight__10_11TO29_36" class="" style="line-height: normal; widows: 1;">problems</span><span id="noHighlight_0.5957124235574156" style="line-height: normal; widows: 1;">,</span><span id="noHighlight_0.6765727247111499" style="line-height: normal; widows: 1;"> </span><span srcinfo="13:14" dstinfo="39:41" paragraphname="paragraph0" issource="false" id="ouHighlight__13_14TO39_41" class="" style="line-height: normal; widows: 1;">but</span><span id="noHighlight_0.5307400184683502" style="line-height: normal; widows: 1;"> </span><span srcinfo="15:16" dstinfo="43:45" paragraphname="paragraph0" issource="false" id="ouHighlight__15_16TO43_45" class="" style="line-height: normal; widows: 1;">not</span><span id="noHighlight_0.2696844497695565" style="line-height: normal; widows: 1;"> </span><span srcinfo="17:18" dstinfo="47:49" paragraphname="paragraph0" issource="false" id="ouHighlight__17_18TO47_49" class="" style="line-height: normal; widows: 1;">all</span><span id="noHighlight_0.5456205212976784" style="line-height: normal; widows: 1;"> </span><span srcinfo="20:21" dstinfo="51:61" paragraphname="paragraph0" issource="false" id="ouHighlight__20_21TO51_61" class="" style="line-height: normal; widows: 1;">cases, </span></font><font size="2" style="background-color: window;">run
fsck offline and a separate fix to fsck</font><font size="2" style="background-color: window;"> is needed. </font><span style="background-color: window; font-size: small; line-height: 1.5;">Thanks, </span></p>
<p><span style="background-color: window; font-size: small; line-height: 1.5;">in </span><span style="font-size: 13px; line-height: 19px; background-color: window;">ocfs2_block_group_clear_bits,
</span><span style="font-size: 13px; line-height: 1.5; background-color: window;">jbd_lock_bh_state and </span><span style="font-size: 13px; line-height: 1.5; background-color: window;">jbd_unlock_bh_state is not </span><span style="color: rgb(51, 51, 51); font-family: Arial, Helvetica; font-size: 13px; line-height: 18px; widows: 1;">in
pair in some case</span><span style="background-color: window; font-size: 13px; line-height: 1.5;">.</span></p>
<p><font size="2" style="background-color: window;"><br>
</font></p>
<p><span style="font-size: 13px; background-color: rgba(0, 0, 0, 0);">Apr 29 18:42:11 cvk53 kernel: [31836.074181] (mount.ocfs2,35204,6):ocfs2_load_local_alloc:353 ERROR: Local alloc hasn't been recovered!<br>
Apr 29 18:42:11 cvk53 kernel: [31836.074181] found = 1011, set = 1011, taken = 2048, off = 387073<br>
Apr 29 18:42:11 cvk53 kernel: [31836.074193] (mount.ocfs2,35204,6):ocfs2_load_local_alloc:373 ERROR: status = -22<br>
Apr 29 18:42:11 cvk53 kernel: [31836.074198] ocfs2: local alloc needs recovery on device (252,0).<br>
Apr 29 18:42:11 cvk53 kernel: [31836.099410] ocfs2: Mounting device (252,0) on (node 1, slot 1) with ordered data mode.<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101379] OCFS2: ERROR (device dm-0): ocfs2_block_group_clear_bits: Group descriptor # 99090432 has bit count 32256 but claims 32281 are freed. num_bits 1037<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101388] File system is now read-only due to the potential of on-disk corruption. Please run fsck.ocfs2 once the file system is unmounted.<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101394] (kworker/u128:0,29935,6):_ocfs2_free_suballoc_bits:2498 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101399] (kworker/u128:0,29935,6):_ocfs2_free_suballoc_bits:2521 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101404] (kworker/u128:0,29935,6):_ocfs2_free_clusters:2584 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101409] (kworker/u128:0,29935,6):_ocfs2_free_clusters:2593 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101414] (kworker/u128:0,29935,6):ocfs2_sync_local_to_main:1025 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101419] (kworker/u128:0,29935,6):ocfs2_sync_local_to_main:1037 ERROR: status = -30<br>
Apr 29 18:42:11 cvk53 kernel: [31836.101424] (kworker/u128:0,29935,6):ocfs2_complete_local_alloc_recovery:606 ERROR: status = -30<br>
Apr 29 18:42:12 cvk53 kernel: [31836.247874] chbk: chbk_store_chk_report 2971: store check result: store wlf2-500g is normal<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231311] NMI watchdog: BUG: soft lockup - CPU#6 stuck for 23s! [jbd2/dm-0-617:35472]<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231320] Modules linked in: ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) ebtable_nat(E) ebtables(E) x_tables(E) ocfs2(OE) quota_tree(E) cls_u32(E) sch_sfq(E) sch_htb(E) chbk(OE) drbd(E) lru_cache(E) 8021q(E)
mrp(E) garp(E) stp(E) llc(E) ipmi_devintf(E) dm_round_robin(E) vhost_net(E) macvtap(E) macvlan(E) vhost(E) kvm_intel(OE) kvm(OE) ib_iser(E) rdma_cm(E) ib_cm(E) iw_cm(E) ib_sa(E) ib_mad(E) ib_core(E) ib_addr(E) iscsi_tcp(E) libiscsi_tcp(E) ocfs2_dlmfs(OE) ocfs2_stack_o2cb(OE)
ocfs2_dlm(OE) ocfs2_nodemanager(OE) ocfs2_stackglue(OE) configfs(E) dm_multipath(E) scsi_dh(E) openvswitch(OE) nf_conntrack(E) nf_defrag_ipv4(E) gre(E) libcrc32c(E) nf_defrag_ipv6(E) nfsd(E) nfs_acl(E) auth_rpcgss(E) nfs(E) fscache(E) lockd(E) sunrpc(E) grace(E)
ipmi_ssif(E) psmouse(E) serio_raw(E) sb_edac(E) edac_core(E) lpc_ich(E) hpwdt(E) hpilo(E) ioatdma(E) dca(E) 8250_fintek(E) ipmi_si(E) ipmi_msghandler(E) video(E) wmi(E) mac_hid(E) acpi_power_meter(E) lp(E) parport(E) be2iscs<br>
Apr 29 18:42:36 cvk53 kernel: i(E) iscsi_boot_sysfs(E) libiscsi(E) be2net(E) scsi_transport_iscsi(E) vxlan(E) hpsa(E) udp_tunnel(E) ip6_udp_tunnel(E) nbd(E)<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231367] CPU: 6 PID: 35472 Comm: jbd2/dm-0-617 Tainted: G OE 4.1.0-generic #1<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231369] Hardware name: H3C FlexServer B390, BIOS I31 12/20/2013<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231370] task: ffff8801fd3c8a10 ti: ffff8807cdc4c000 task.ti: ffff8807cdc4c000<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231371] RIP: 0010:[<ffffffff812e06b3>] [<ffffffff812e06b3>] jbd2_journal_commit_transaction+0xc03/0x1aa0<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231379] RSP: 0018:ffff8807cdc4fc58 EFLAGS: 00000206<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231380] RAX: 0000000000a20029 RBX: ffffffff812e7f48 RCX: 3ffffffffffffffe<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231381] RDX: 0000000000000000 RSI: 000000010078349b RDI: ffff88040ec34f60<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231382] RBP: ffff8807cdc4fe28 R08: ffff8807cdc4c000 R09: 0000000000000020<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231383] R10: 0000000000000002 R11: 0000000000000000 R12: ffff8803dec1e9c0<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231384] R13: ffff8807cdc4fbc8 R14: ffffffff81236f36 R15: ffff8807cdc4fbc8<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231385] FS: 0000000000000000(0000) GS:ffff88042f780000(0000) knlGS:0000000000000000<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231386] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231387] CR2: 0000000000bbd328 CR3: 0000000001c0f000 CR4: 00000000001406e0<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231388] Stack:<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231389] ffff8807cdc4fc68 ffff8801fd3c8a78 ffff88042fa97530 ffff8801fd3c8a78<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231391] ffff88042fa97530 0000000c00000000 ffff8807cdc4fcf8 ffff8802bb749000<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231393] 0000000000000000 ffff8803bb659024 ffff8807cdc4fce8 ffffffff810a85dc<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231395] Call Trace:<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231400] [<ffffffff810a85dc>] ? ttwu_do_wakeup+0x2c/0x110<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231403] [<ffffffff810bb055>] ? pick_next_task_fair+0x115/0x4d0<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231406] [<ffffffff81015686>] ? __switch_to+0x1e6/0x580<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231409] [<ffffffff810a50f5>] ? finish_task_switch+0xf5/0x150<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231413] [<ffffffff810e908f>] ? try_to_del_timer_sync+0x4f/0x70<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231415] [<ffffffff812e4d33>] kjournald2+0xb3/0x230<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231418] [<ffffffff810c10a0>] ? prepare_to_wait_event+0x100/0x100<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231419] [<ffffffff812e4c80>] ? commit_timeout+0x10/0x10<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231421] [<ffffffff8109def9>] kthread+0xc9/0xe0<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231422] [<ffffffff8109de30>] ? flush_kthread_worker+0x90/0x90<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231427] [<ffffffff817f6a22>] ret_from_fork+0x42/0x70<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231428] [<ffffffff8109de30>] ? flush_kthread_worker+0x90/0x90<br>
Apr 29 18:42:36 cvk53 kernel: [31861.231429] Code: ff ff 00 00 00 00 48 89 8d 98 fe ff ff e9 06 fa ff ff 89 c6 4c 89 ef e8 0c 77 00 00 4d 8b 74 24 28 e9 f2 f9 ff ff f3 90 49 8b 06 <a9> 00 00 80 00 75 f4 e9 8b f6 ff ff 90 45 85 ff 0f 85 65 0e 00 </span></p>
<p><font size="2"><br>
</font><br>
<br>
<font size="2">Date: Wed, 2 Dec 2015 15:07:11 +0800</font><br>
<font size="2">From: Junxiao Bi <junxiao.bi@oracle.com></font><br>
<font size="2">Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: fix BUG due to uncleaned</font><br>
<font size="2"> localalloc during mount</font><br>
<font size="2">To: xuejiufei@huawei.com, Joseph Qi <joseph.qi@huawei.com>, Andrew</font><br>
<font size="2"> Morton <akpm@linux-foundation.org></font><br>
<font size="2">Cc: Mark Fasheh <mfasheh@suse.com>, "ocfs2-devel@oss.oracle.com"</font><br>
<font size="2"> <ocfs2-devel@oss.oracle.com></font><br>
<font size="2">Message-ID: <565E989F.9020302@oracle.com></font><br>
<font size="2">Content-Type: text/plain; charset=windows-1252</font><br>
<br>
<font size="2">On 12/02/2015 02:52 PM, Xue jiufei wrote:</font><br>
<font size="2">> Hi Junxiao,</font><br>
<font size="2">> On 2015/12/1 16:02, Junxiao Bi wrote:</font><br>
<font size="2">>> Hi Joseph,</font><br>
<font size="2">>></font><br>
<font size="2">>> On 11/24/2015 09:38 PM, Joseph Qi wrote:</font><br>
<font size="2">>>> Tariq has reported a BUG before and posted a fix at:</font><br>
<font size="2">>>> </font><a href="https://oss.oracle.com/pipermail/ocfs2-devel/2015-April/010696.html" style="font-size: small;">https://oss.oracle.com/pipermail/ocfs2-devel/2015-April/010696.html</a><br>
<font size="2">>>></font><br>
<font size="2">>>> This is because during umount, localalloc shutdown relies on journal</font><br>
<font size="2">>>> shutdown. But during journal shutdown, it just stops commit thread</font><br>
<font size="2">>>> without checking its result. So it may happen that localalloc shutdown</font><br>
<font size="2">>>> uncleaned during I/O error and after that, journal then has been marked</font><br>
<font size="2">>>> clean if I/O restores.</font><br>
<font size="2">>> The above is a storage issue. In this condition, io error can even</font><br>
<font size="2">>> happen to journal commit, some transactions may have wrong data. Let fs</font><br>
<font size="2">>> go without a fsck may cause corruption.</font><br>
<font size="2">>> I am thinking whether we can fail the mount and mark the journal dirty</font><br>
<font size="2">>> again. Then we can do fsck to it withoug a fsck patch.</font><br>
<font size="2">>></font><br>
<font size="2">> Can you explain which situation would cause file system corruption. I think</font><br>
<font size="2">> if IO error happens to journal commit and commit block have not reach the disk,</font><br>
<font size="2">> the whole transactions is skipped while recovering the journal. So file system</font><br>
<font size="2">> is still consistent.</font><br>
<font size="2">At least local alloc inconsistent as this storage error, right? I think</font><br>
<font size="2">it can't be sure whether this caused some other metadata inconsistent,</font><br>
<font size="2">so a full fsck deserved.</font><br>
<br>
<font size="2">Thanks,</font><br>
<font size="2">Junxiao.</font><br>
<br>
<font size="2">> Thanks,</font><br>
<font size="2">> Xuejiufei</font><br>
<font size="2">></font><br>
<font size="2">>> Thanks,</font><br>
<font size="2">>> Junxiao.</font><br>
<font size="2">>></font><br>
<font size="2">>>> Then during mount, localalloc won't be recovered because of clean</font><br>
<font size="2">>>> journal and then trigger BUG when claiming clusters from localalloc.</font><br>
<font size="2">>>></font><br>
<font size="2">>>> In Tariq's fix, we have to run fsck offline and a separate fix to fsck</font><br>
<font size="2">>>> is needed because it currently does not support clearing out localalloc</font><br>
<font size="2">>>> inode. And my way to fix this issue is checking localalloc before</font><br>
<font size="2">>>> actually loading it during mount. And this is somewhat online.</font><br>
<font size="2">>>></font><br>
<font size="2">>>> Signed-off-by: Joseph Qi <joseph.qi@huawei.com></font><br>
<font size="2">>>> ---</font><br>
<font size="2">>>> fs/ocfs2/localalloc.c | 19 ++++++++++++-------</font><br>
<font size="2">>>> fs/ocfs2/localalloc.h | 2 +-</font><br>
<font size="2">>>> fs/ocfs2/super.c | 17 ++++++++++++++---</font><br>
<font size="2">>>> 3 files changed, 27 insertions(+), 11 deletions(-)</font><br>
<font size="2">>>></font><br>
<font size="2">>>> diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c</font><br>
<font size="2">>>> index 0a4457f..ceebaef 100644</font><br>
<font size="2">>>> --- a/fs/ocfs2/localalloc.c</font><br>
<font size="2">>>> +++ b/fs/ocfs2/localalloc.c</font><br>
<font size="2">>>> @@ -281,7 +281,7 @@ bail:</font><br>
<font size="2">>>> return ret;</font><br>
<font size="2">>>> }</font><br>
<font size="2">>>></font><br>
<font size="2">>>> -int ocfs2_load_local_alloc(struct ocfs2_super *osb)</font><br>
<font size="2">>>> +int ocfs2_load_local_alloc(struct ocfs2_super *osb, int check, int *recovery)</font><br>
<font size="2">>>> {</font><br>
<font size="2">>>> int status = 0;</font><br>
<font size="2">>>> struct ocfs2_dinode *alloc = NULL;</font><br>
<font size="2">>>> @@ -345,21 +345,26 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)</font><br>
<font size="2">>>> if (num_used</font><br>
<font size="2">>>> || alloc->id1.bitmap1.i_used</font><br>
<font size="2">>>> || alloc->id1.bitmap1.i_total</font><br>
<font size="2">>>> - || la->la_bm_off)</font><br>
<font size="2">>>> + || la->la_bm_off) {</font><br>
<font size="2">>>> mlog(ML_ERROR, "Local alloc hasn't been recovered!\n"</font><br>
<font size="2">>>> "found = %u, set = %u, taken = %u, off = %u\n",</font><br>
<font size="2">>>> num_used, le32_to_cpu(alloc->id1.bitmap1.i_used),</font><br>
<font size="2">>>> le32_to_cpu(alloc->id1.bitmap1.i_total),</font><br>
<font size="2">>>> OCFS2_LOCAL_ALLOC(alloc)->la_bm_off);</font><br>
<font size="2">>>> + status = -EINVAL;</font><br>
<font size="2">>>> + *recovery = 1;</font><br>
<font size="2">>>> + goto bail;</font><br>
<font size="2">>>> + }</font><br>
<font size="2">>>></font><br>
<font size="2">>>> - osb->local_alloc_bh = alloc_bh;</font><br>
<font size="2">>>> - osb->local_alloc_state = OCFS2_LA_ENABLED;</font><br>
<font size="2">>>> + if (!check) {</font><br>
<font size="2">>>> + osb->local_alloc_bh = alloc_bh;</font><br>
<font size="2">>>> + osb->local_alloc_state = OCFS2_LA_ENABLED;</font><br>
<font size="2">>>> + }</font><br>
<font size="2">>>></font><br>
<font size="2">>>> bail:</font><br>
<font size="2">>>> - if (status < 0)</font><br>
<font size="2">>>> + if (status < 0 || check)</font><br>
<font size="2">>>> brelse(alloc_bh);</font><br>
<font size="2">>>> - if (inode)</font><br>
<font size="2">>>> - iput(inode);</font><br>
<font size="2">>>> + iput(inode);</font><br>
<font size="2">>>></font><br>
<font size="2">>>> trace_ocfs2_load_local_alloc(osb->local_alloc_bits);</font><br>
<font size="2">>>></font><br>
<font size="2">>>> diff --git a/fs/ocfs2/localalloc.h b/fs/ocfs2/localalloc.h</font><br>
<font size="2">>>> index 44a7d1f..a913841 100644</font><br>
<font size="2">>>> --- a/fs/ocfs2/localalloc.h</font><br>
<font size="2">>>> +++ b/fs/ocfs2/localalloc.h</font><br>
<font size="2">>>> @@ -26,7 +26,7 @@</font><br>
<font size="2">>>> #ifndef OCFS2_LOCALALLOC_H</font><br>
<font size="2">>>> #define OCFS2_LOCALALLOC_H</font><br>
<font size="2">>>></font><br>
<font size="2">>>> -int ocfs2_load_local_alloc(struct ocfs2_super *osb);</font><br>
<font size="2">>>> +int ocfs2_load_local_alloc(struct ocfs2_super *osb, int check, int *recovery);</font><br>
<font size="2">>>></font><br>
<font size="2">>>> void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb);</font><br>
<font size="2">>>></font><br>
<font size="2">>>> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c</font><br>
<font size="2">>>> index 2de4c8a..4004b29 100644</font><br>
<font size="2">>>> --- a/fs/ocfs2/super.c</font><br>
<font size="2">>>> +++ b/fs/ocfs2/super.c</font><br>
<font size="2">>>> @@ -2428,6 +2428,7 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)</font><br>
<font size="2">>>> int status;</font><br>
<font size="2">>>> int dirty;</font><br>
<font size="2">>>> int local;</font><br>
<font size="2">>>> + int la_dirty = 0, recovery = 0;</font><br>
<font size="2">>>> struct ocfs2_dinode *local_alloc = NULL; /* only used if we</font><br>
<font size="2">>>> * recover</font><br>
<font size="2">>>> * ourselves. */</font><br>
<font size="2">>>> @@ -2449,6 +2450,16 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)</font><br>
<font size="2">>>> * recover anything. Otherwise, journal_load will do that</font><br>
<font size="2">>>> * dirty work for us :) */</font><br>
<font size="2">>>> if (!dirty) {</font><br>
<font size="2">>>> + /* It may happen that local alloc is unclean shutdown, but</font><br>
<font size="2">>>> + * journal has been marked clean, so check it here and do</font><br>
<font size="2">>>> + * recovery if needed */</font><br>
<font size="2">>>> + status = ocfs2_load_local_alloc(osb, 1, &recovery);</font><br>
<font size="2">>>> + if (recovery) {</font><br>
<font size="2">>>> + printk(KERN_NOTICE "ocfs2: local alloc needs recovery "</font><br>
<font size="2">>>> + "on device (%s).\n", osb->dev_str);</font><br>
<font size="2">>>> + la_dirty = 1;</font><br>
<font size="2">>>> + }</font><br>
<font size="2">>>> +</font><br>
<font size="2">>>> status = ocfs2_journal_wipe(osb->journal, 0);</font><br>
<font size="2">>>> if (status < 0) {</font><br>
<font size="2">>>> mlog_errno(status);</font><br>
<font size="2">>>> @@ -2477,7 +2488,7 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)</font><br>
<font size="2">>>> JBD2_FEATURE_COMPAT_CHECKSUM, 0,</font><br>
<font size="2">>>> JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);</font><br>
<font size="2">>>></font><br>
<font size="2">>>> - if (dirty) {</font><br>
<font size="2">>>> + if (dirty || la_dirty) {</font><br>
<font size="2">>>> /* recover my local alloc if we didn't unmount cleanly. */</font><br>
<font size="2">>>> status = ocfs2_begin_local_alloc_recovery(osb,</font><br>
<font size="2">>>> osb->slot_num,</font><br>
<font size="2">>>> @@ -2490,13 +2501,13 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)</font><br>
<font size="2">>>> * ourselves as mounted. */</font><br>
<font size="2">>>> }</font><br>
<font size="2">>>></font><br>
<font size="2">>>> - status = ocfs2_load_local_alloc(osb);</font><br>
<font size="2">>>> + status = ocfs2_load_local_alloc(osb, 0, &recovery);</font><br>
<font size="2">>>> if (status < 0) {</font><br>
<font size="2">>>> mlog_errno(status);</font><br>
<font size="2">>>> goto finally;</font><br>
<font size="2">>>> }</font><br>
<font size="2">>>></font><br>
<font size="2">>>> - if (dirty) {</font><br>
<font size="2">>>> + if (dirty || la_dirty) {</font><br>
<font size="2">>>> /* Recovery will be completed after we've mounted the</font><br>
<font size="2">>>> * rest of the volume. */</font><br>
<font size="2">>>> osb->dirty = 1;</font><br>
<font size="2">>>></font><br>
<font size="2">>></font><br>
<font size="2">>></font><br>
<font size="2">>> _______________________________________________</font><br>
<font size="2">>> Ocfs2-devel mailing list</font><br>
<font size="2">>> Ocfs2-devel@oss.oracle.com</font><br>
<font size="2">>> </font><a href="https://oss.oracle.com/mailman/listinfo/ocfs2-devel" style="font-size: small;">https://oss.oracle.com/mailman/listinfo/ocfs2-devel</a><br>
<font size="2">>></font><br>
<font size="2">>> .</font><br>
<font size="2">>></font><br>
<font size="2">></font><br>
<br>
<br>
<br>
<br>
</p>
</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:"Arial","sans-serif";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>