Skip to contentSkip to conversation

dlm fixes for 3.4

GIT PULL David Teigland 1 participant 1 message Apr 23, 2012 Distributed lock manager (DLM)

lore
Share & tools
lore

David Teigland

author maintainer
#0 lore raw

Hi Linus,

Please pull dlm fixes from tag:

git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git dlm-fixes-3.4

This includes one short patch fixing the behavior of the QUECVT flag, which the gfs2 folks are waiting on.

Thanks,
Dave

From: David Teigland <[email protected]>
Date: Wed, 4 Apr 2012 09:49:15 -0500
Subject: [PATCH] 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.

---
 fs/dlm/lock.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
fs/dlm/lock.c +12 -0
index fa5c07d..4c58d4a 100644
@@ -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.
 	 */
Signature · 1 line
1.7.10.rc3