From: David Teigland Date: Fri, 10 Nov 2006 20:16:27 +0000 (-0600) Subject: [DLM] clear sbflags on lock master X-Git-Tag: v2.6.20-rc1~145^2^2~5^2~28 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6f90a8b1b87f97144911790390d56f695b59db9b;p=linux-2.6-omap-h63xx.git [DLM] clear sbflags on lock master RH BZ 211622 The ALTMODE flag can be set in the lock master's copy of the lock but never cleared, so ALTMODE will also be returned in a subsequent conversion of the lock when it shouldn't be. This results in lock_dlm incorrectly switching to the alternate lock mode when returning the result to gfs which then asserts when it sees the wrong lock state. The fix is to propagate the cleared sbflags value to the master node when the lock is requested. QA's d_rwrandirectlarge test triggers this bug very quickly. Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse --- diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 6088a16926b..30878defaeb 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -2372,6 +2372,7 @@ static int send_lookup_reply(struct dlm_ls *ls, struct dlm_message *ms_in, static void receive_flags(struct dlm_lkb *lkb, struct dlm_message *ms) { lkb->lkb_exflags = ms->m_exflags; + lkb->lkb_sbflags = ms->m_sbflags; lkb->lkb_flags = (lkb->lkb_flags & 0xFFFF0000) | (ms->m_flags & 0x0000FFFF); }