Skip to content

Commit

Permalink
dlm: another call to confirm_master in receive_request_reply
Browse files Browse the repository at this point in the history
When a failed request (EBADR or ENOTBLK) is unlocked/canceled instead of
retried, there may be other lkb's waiting on the rsb_lookup list for it
to complete.  A call to confirm_master() is needed to move on to the next
waiting lkb since the current one won't be retried.

Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
David Teigland committed Jan 30, 2008
1 parent 601342c commit aec64e1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1940,8 +1940,11 @@ static void confirm_master(struct dlm_rsb *r, int error)
break;

case -EAGAIN:
/* the remote master didn't queue our NOQUEUE request;
make a waiting lkb the first_lkid */
case -EBADR:
case -ENOTBLK:
/* the remote request failed and won't be retried (it was
a NOQUEUE, or has been canceled/unlocked); make a waiting
lkb the first_lkid */

r->res_first_lkid = 0;

Expand Down Expand Up @@ -3382,6 +3385,7 @@ static void receive_request_reply(struct dlm_ls *ls, struct dlm_message *ms)
if (is_overlap(lkb)) {
/* we'll ignore error in cancel/unlock reply */
queue_cast_overlap(r, lkb);
confirm_master(r, result);
unhold_lkb(lkb); /* undoes create_lkb() */
} else
_request_lock(r, lkb);
Expand Down

0 comments on commit aec64e1

Please sign in to comment.