diff options
author | David Teigland <teigland@redhat.com> | 2012-06-05 15:55:19 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2012-07-16 14:18:22 -0500 |
commit | c503a62103c46d56447f56306b52be6f844689ba (patch) | |
tree | cfc821efb8d7cd73e411d25251607428769e6e9e /fs/dlm/recover.c | |
parent | 6d768177c282637a7943e72b4b2b148e7553ecf1 (diff) | |
download | linux-c503a62103c46d56447f56306b52be6f844689ba.tar.bz2 |
dlm: fix conversion deadlock from recovery
The process of rebuilding locks on a new master during
recovery could re-order the locks on the convert queue,
creating an "in place" conversion deadlock that would
not be resolved. Fix this by not considering queue
order when granting conversions after recovery.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/recover.c')
-rw-r--r-- | fs/dlm/recover.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c index 12702cc533b3..4a7a76e42fc3 100644 --- a/fs/dlm/recover.c +++ b/fs/dlm/recover.c @@ -804,6 +804,7 @@ static void recover_lvb(struct dlm_rsb *r) static void recover_conversion(struct dlm_rsb *r) { + struct dlm_ls *ls = r->res_ls; struct dlm_lkb *lkb; int grmode = -1; @@ -818,10 +819,15 @@ static void recover_conversion(struct dlm_rsb *r) list_for_each_entry(lkb, &r->res_convertqueue, lkb_statequeue) { if (lkb->lkb_grmode != DLM_LOCK_IV) continue; - if (grmode == -1) + if (grmode == -1) { + log_debug(ls, "recover_conversion %x set gr to rq %d", + lkb->lkb_id, lkb->lkb_rqmode); lkb->lkb_grmode = lkb->lkb_rqmode; - else + } else { + log_debug(ls, "recover_conversion %x set gr %d", + lkb->lkb_id, grmode); lkb->lkb_grmode = grmode; + } } } |