From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster dlm-kernel/src/locking.c gfs-kernel/sr ...
Date: 3 Jan 2007 16:10:28 -0000 [thread overview]
Message-ID: <20070103161028.1745.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: teigland at sourceware.org 2007-01-03 16:10:28
Modified files:
dlm-kernel/src : locking.c
gfs-kernel/src/dlm: lock.c
Log message:
Don't panic if we try to unlock a plock that's already being unlocked.
From jwhiter at redhat.com
bz 220219
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/locking.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.50.2.9&r2=1.50.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/dlm/lock.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.15.2.7&r2=1.15.2.8
--- cluster/dlm-kernel/src/Attic/locking.c 2006/06/22 14:29:54 1.50.2.9
+++ cluster/dlm-kernel/src/Attic/locking.c 2007/01/03 16:10:27 1.50.2.10
@@ -850,7 +850,10 @@
if (lkb->lkb_lockqueue_state) {
log_error(ls, "(%d) dlm_unlock: %x busy %d",
lkb->lkb_ownpid, lkid, lkb->lkb_lockqueue_state);
- ret = -EBUSY;
+ if (lkb->lkb_lockqueue_state == GDLM_LQSTATE_WAIT_UNLOCK)
+ ret = -EINPROGRESS;
+ else
+ ret = -EBUSY;
goto out;
}
--- cluster/gfs-kernel/src/dlm/Attic/lock.c 2005/06/29 07:28:21 1.15.2.7
+++ cluster/gfs-kernel/src/dlm/Attic/lock.c 2007/01/03 16:10:28 1.15.2.8
@@ -336,7 +336,10 @@
void do_dlm_unlock(dlm_lock_t *lp)
{
unsigned int lkf = 0;
- int error;
+ int error, plock = 0;
+
+ if (lp->lockname.ln_type == LM_TYPE_PLOCK)
+ plock = 1;
set_bit(LFL_DLM_UNLOCK, &lp->flags);
set_bit(LFL_WAIT_COMPLETE, &lp->flags);
@@ -351,7 +354,8 @@
error = dlm_unlock(lp->dlm->gdlm_lsp, lp->lksb.sb_lkid, lkf, NULL, lp);
- DLM_ASSERT(!error,
+
+ DLM_ASSERT(!error || (plock && error == -EINPROGRESS),
printk("%s: error=%d num=%x,%"PRIx64" lkf=%x flags=%lx\n",
lp->dlm->fsname, error, lp->lockname.ln_type,
lp->lockname.ln_number, lp->lkf, lp->flags););
next reply other threads:[~2007-01-03 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-03 16:10 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-01 23:03 [Cluster-devel] cluster dlm-kernel/src/locking.c gfs-kernel/sr rpeterso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070103161028.1745.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.