* [Cluster-devel] cluster dlm-kernel/src/locking.c gfs-kernel/sr ...
@ 2007-01-03 16:10 teigland
0 siblings, 0 replies; 2+ messages in thread
From: teigland @ 2007-01-03 16:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
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););
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cluster-devel] cluster dlm-kernel/src/locking.c gfs-kernel/sr ...
@ 2007-02-01 23:03 rpeterso
0 siblings, 0 replies; 2+ messages in thread
From: rpeterso @ 2007-02-01 23:03 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: rpeterso at sourceware.org 2007-02-01 23:03:00
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=STABLE&r1=1.50.2.8.6.1&r2=1.50.2.8.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/dlm/lock.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.15.2.6.6.1&r2=1.15.2.6.6.2
--- cluster/dlm-kernel/src/Attic/locking.c 2006/07/07 15:24:47 1.50.2.8.6.1
+++ cluster/dlm-kernel/src/Attic/locking.c 2007/02/01 23:02:59 1.50.2.8.6.2
@@ -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 06:57:08 1.15.2.6.6.1
+++ cluster/gfs-kernel/src/dlm/Attic/lock.c 2007/02/01 23:03:00 1.15.2.6.6.2
@@ -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,7 @@
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););
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-01 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-03 16:10 [Cluster-devel] cluster dlm-kernel/src/locking.c gfs-kernel/sr teigland
-- strict thread matches above, loose matches on Subject: below --
2007-02-01 23:03 rpeterso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).