summaryrefslogtreecommitdiff
path: root/fs/dlm
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-04-04 09:49:15 -0500
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-30 17:57:13 +0530
commita29251120f1ed1c531dab1fc1d17a50ec330fa25 (patch)
treee948ac79fae2b6ed8342393fcb09882c62fa0342 /fs/dlm
parentdc92e3cfe89fb5007a3863075e684851214e6ada (diff)
dlm: fix QUECVT when convert queue is empty
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index fa5c07d51dcc..4c58d4a3adc4 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1737,6 +1737,18 @@ static int _can_be_granted(struct dlm_rsb *r, struct dlm_lkb *lkb, int now)
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.
*/