diff mbox

[Ocfs2-tools,Ocfs2-tools-devel,1/1] o2hb doesn't not exit when fsck uncleanly device

Message ID D1E4D02760513D4B90DC3B40FF32AF355EE263D6@H3CMLB14-EX.srv.huawei-3com.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shichangkuo April 5, 2016, 8:36 a.m. UTC
Hi Srinivas,
    When I run fsck to recover an unclean device, I find that the o2hb thread doesn't exit.  The version is 1.8.4, and I also find the same issue on other versions.
    After reviewing codes, re-open device will make ost->ost_fs->fs_dlm_ctxt change to NULL after replayed journals. At the end of code, it will determines whether to exit dlm and o2hb by this pointer.
    Recording the pointer will solve the issue.


-------------------------------------------------------------------------------------------------------------------------------------
????????????????????????????????????????
????????????????????????????????????????
????????????????????????????????????????
???
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
diff mbox

Patch

diff -up a/ocfs2-tools/libocfs2/openfs.c b/ocfs2-tools/libocfs2/openfs.c
--- a/ocfs2-tools/libocfs2/openfs.c
+++ b/ocfs2-tools/libocfs2/openfs.c
@@ -464,6 +464,8 @@ 
                  ptr += 2;
        }
+       if (*ret_fs && (*ret_fs)->fs_dlm_ctxt)
+                fs->fs_dlm_ctxt = (*ret_fs)->fs_dlm_ctxt;
        *ret_fs = fs;
        return 0;

BTW: why should we open the device twice in this scene?