]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-wakeup-the-downconvert-thread-after-a-success.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-wakeup-the-downconvert-thread-after-a-success.patch
1 From: Sunil Mushran <sunil.mushran@oracle.com>
2 Date: Thu, 29 Jan 2009 17:12:31 -0800
3 Subject: [PATCH] ocfs2: Wakeup the downconvert thread after a successful cancel convert
4 Patch-mainline: 2.6.29
5
6 When two nodes holding PR locks on a resource concurrently attempt to
7 upconvert the locks to EX, the master sends a BAST to one of the nodes. This
8 message tells that node to first cancel convert the upconvert request,
9 followed by downconvert to a NL. Only when this lock is downconverted to NL,
10 can the master upconvert the first node's lock to EX.
11
12 While the fs was doing the cancel convert, it was forgetting to wake up the
13 dc thread after a successful cancel, leading to a deadlock.
14
15 Reported-and-Tested-by: David Teigland <teigland@redhat.com>
16 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
17 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
18 ---
19 fs/ocfs2/dlmglue.c | 4 ++++
20 1 file changed, 4 insertions(+)
21
22 --- a/fs/ocfs2/dlmglue.c
23 +++ b/fs/ocfs2/dlmglue.c
24 @@ -2866,6 +2866,10 @@ static void ocfs2_unlock_ast(void *opaqu
25 case OCFS2_UNLOCK_CANCEL_CONVERT:
26 mlog(0, "Cancel convert success for %s\n", lockres->l_name);
27 lockres->l_action = OCFS2_AST_INVALID;
28 + /* Downconvert thread may have requeued this lock, we
29 + * need to wake it. */
30 + if (lockres->l_flags & OCFS2_LOCK_BLOCKED)
31 + ocfs2_wake_downconvert_thread(ocfs2_get_lockres_osb(lockres));
32 break;
33 case OCFS2_UNLOCK_DROP_LOCK:
34 lockres->l_level = DLM_LOCK_IV;