Skip to content

Commit

Permalink
dlm: fix QUECVT when convert queue is empty
Browse files Browse the repository at this point in the history
The QUECVT flag should not prevent conversions from
being granted immediately when the convert queue is
empty.

Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
David Teigland committed Apr 23, 2012
1 parent dd775ae commit 53ad1c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,18 @@ static int _can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now)
if (now && conv && !(lkb->lkb_exflags & DLM_LKF_QUECVT))
return 1;

/*
* Even if the convert is compat with all granted locks,
* QUECVT forces it behind other locks on the convert queue.
*/

if (now && conv && (lkb->lkb_exflags & DLM_LKF_QUECVT)) {
if (list_empty(&r->res_convertqueue))
return 1;
else
goto out;
}

/*
* The NOORDER flag is set to avoid the standard vms rules on grant
* order.
Expand Down

0 comments on commit 53ad1c9

Please sign in to comment.