Linux ocfs2 filesystem development
 help / color / mirror / Atom feed
From: Zhangguanghui <zhang.guanghui@h3c.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] LVB patch for reviews, thanks
Date: Mon, 25 May 2015 12:19:32 +0000	[thread overview]
Message-ID: <2015052520192992179519@h3c.com> (raw)
In-Reply-To: 71604351584F6A4EBAE558C676F37CA4696D3C66@H3CMLB14-EX.srv.huawei-3com.com

the dlm lock migration(A->B) may lead to  lvb difference.
 1. A node migrage dlm lock,  while flags=4(DLM_LKSB_GET_LVB)
 2. B node update lock lvb,  just when flags=2(DLM_LKSB_PUT_LVB),  So this will be a lvb update problem.
in the dlm_process_recovery_data,  DLM_LKSB_GET_LVB instead of DLM_LKSB_PUT_LVB.
if (!dlm_lvb_is_empty(mres->lvb)) {
-if (lksb->flags & DLM_LKSB_PUT_LVB) {
+if (lksb->flags & DLM_LKSB_GET_LVB) {

the patch ensures that the other valid locks have the same a LVB by updating to solute the problem of BUGs in the migrage dlm lock

Finally, any feedback about this process (positive or negative) would be  greatly appreciated.

A Node:
May 25 14:37:29 cvk12 kernel: [ 1166.838861] AAAAA: dlm_add_lock_to_array, send ml info: type=3, conv=5, node=12, flags=4, list=1, cookie=12:1063
May 25 14:37:29 cvk12 kernel: [ 1166.838862] mres lvb: 05000000000000dd00000000000000001558b0a8a12d3bec1558b0a6036067131558b0a603606713000000000de0000081800001000000005a7219b300000000
May 25 14:37:29 cvk12 kernel: [ 1166.838887] lock lksb lvb: 05000000000000dd00000000000000001558b0a8a12d3bec1558b0a6036067131558b0a603606713000000000de0000081800001000000005a7219b300000000


________________________________
zhangguanghui 10102

From: guozhonghua 02084 (RD)<mailto:guozhonghua@h3c.com>
Date: 2015-05-25 16:22
To: ocfs2-devel at oss.oracle.com<mailto:ocfs2-devel@oss.oracle.com>; ocfs2-devel-request at oss.oracle.com<mailto:ocfs2-devel-request@oss.oracle.com>
CC: shichangkuo<mailto:shi.changkuo@h3c.com>; zhangguanghui 10102 (RD)<mailto:zhang.guanghui@h3c.com>; changlimin 00148<mailto:changlimin@h3c.com>
Subject: LVB patch for reviews, thanks

As dlm lock LVB different, the dlm lock migration may be failed without the dlm lock.

So the new owner will not have the dlm lock with the node, such as cookie 10:2696 as below.

diff -cp dlmrecovery_org.c dlmrecovery.c

*** dlmrecovery_org.c   2015-05-25 09:53:05.530826236 +0800

--- dlmrecovery.c       2015-05-25 10:01:12.242839116 +0800

*************** static void dlm_prepare_lvb_for_migratio

*** 1194,1199 ****

--- 1194,1203 ----

        if (!lock->lksb)

               return;



+       if (dlm_lvb_is_empty(lock->lksb->lvb)) {

+               return;

+       }

+

        /* Ignore lvb in all locks in the blocked list */

        if (queue == DLM_BLOCKED_LIST)

                return;


May 24 16:45:51 cvk60 kernel: [  868.542596] (umount,20349,2):dlm_prepare_lvb_for_migration:1235 ERROR: Mismatched lvb in lock cookie=10:2696, name=M00000000000000017a012300000000, node=10

May 24 16:45:51 cvk60 kernel: [  868.542603] lockres: M00000000000000017a012300000000, owner=8, state=32

May 24 16:45:51 cvk60 kernel: [  868.542604]   last used: 0, refcnt: 12, on purge list: no

May 24 16:45:51 cvk60 kernel: [  868.542606]   on dirty list: no, on reco list: no, migrating pending: no

May 24 16:45:51 cvk60 kernel: [  868.542607]   inflight locks: 0, asts reserved: 0

May 24 16:45:51 cvk60 kernel: [  868.542608]   refmap nodes: [ 1 2 3 5 6 7 9 10 11 12 ], inflight=0

May 24 16:45:51 cvk60 kernel: [  868.542613]   res lvb: 05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542636]   granted queue:

May 24 16:45:51 cvk60 kernel: [  868.542638]     type=3, conv=-1, node=7, cookie=7:2863, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542639]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542664]     type=3, conv=-1, node=10, cookie=10:2696, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542665]     lock lvb:

May 24 16:45:51 cvk60 kernel: [  868.542668]     type=3, conv=-1, node=12, cookie=12:2528, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542669]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542694]     type=3, conv=-1, node=11, cookie=11:1308, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542695]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542719]     type=3, conv=-1, node=3, cookie=3:6315, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542720]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542745]     type=3, conv=-1, node=6, cookie=6:3745, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542746]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542771]     type=3, conv=-1, node=9, cookie=9:2746, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542772]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542797]     type=3, conv=-1, node=2, cookie=2:7003, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542798]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542822]     type=3, conv=-1, node=1, cookie=1:1921, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542823]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542848]     type=3, conv=-1, node=5, cookie=5:2841, ref=2, ast=(empty=y,pend=n), bast=(empty=y,pend=n), pending=(conv=n,lock=n,cancel=n,unlock=n)

May 24 16:45:51 cvk60 kernel: [  868.542849]     lock lvb:05000000000000450000000000000000155863770a7adf68155863764986bbdc155863764986bbdc0000000004600000818000010000000046c6e83500000000

May 24 16:45:51 cvk60 kernel: [  868.542873]   converting queue:

May 24 16:45:51 cvk60 kernel: [  868.542874]   blocked queue:

-------------------------------------------------------------------------------------------------------------------------------------
????????????????????????????????????????
????????????????????????????????????????
????????????????????????????????????????
???
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20150525/0a73f88e/attachment-0001.html 

  reply	other threads:[~2015-05-25 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25  8:22 [Ocfs2-devel] LVB patch for reviews, thanks Guozhonghua
2015-05-25 12:19 ` Zhangguanghui [this message]
2015-06-06 13:11   ` [Ocfs2-devel] o2net_fill_node_map " Zhangguanghui
  -- strict thread matches above, loose matches on Subject: below --
2015-05-25 12:23 [Ocfs2-devel] LVB patch for " Guozhonghua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2015052520192992179519@h3c.com \
    --to=zhang.guanghui@h3c.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox