* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2006-08-14 21:11 teigland
0 siblings, 0 replies; 7+ messages in thread
From: teigland @ 2006-08-14 21:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: teigland at sourceware.org 2006-08-14 21:11:31
Modified files:
dlm-kernel/src : device.c
Log message:
fix bz 201325 - Kernel Oops when passing LKF_CANCEL to dlm_ls_unlock_wait
from Carsten Clasohm (clasohm at redhat.com)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.24.2.8&r2=1.24.2.9
--- cluster/dlm-kernel/src/Attic/device.c 2006/04/12 09:36:03 1.24.2.8
+++ cluster/dlm-kernel/src/Attic/device.c 2006/08/14 21:11:31 1.24.2.9
@@ -344,7 +344,7 @@
/* If the LKB has been freed then we need to tidy up too */
lkb = dlm_get_lkb(li->li_file->fi_ls->ls_lockspace, li->li_lksb.sb_lkid);
- if (!lkb) {
+ if (!lkb && test_bit(LI_FLAG_ONLIST, &li->li_flags)) {
spin_lock(&li->li_file->fi_lkb_lock);
list_del(&li->li_ownerqueue);
clear_bit(LI_FLAG_ONLIST, &li->li_flags);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2006-08-14 21:13 teigland
0 siblings, 0 replies; 7+ messages in thread
From: teigland @ 2006-08-14 21:13 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: teigland at sourceware.org 2006-08-14 21:13:26
Modified files:
dlm-kernel/src : device.c
Log message:
fix bz 201325 - Kernel Oops when passing LKF_CANCEL to dlm_ls_unlock_wait
from Carsten Clasohm (clasohm at redhat.com)
CVn: device.c
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.24.2.1.4.1.2.8&r2=1.24.2.1.4.1.2.9
--- cluster/dlm-kernel/src/Attic/device.c 2006/04/12 09:25:00 1.24.2.1.4.1.2.8
+++ cluster/dlm-kernel/src/Attic/device.c 2006/08/14 21:13:26 1.24.2.1.4.1.2.9
@@ -344,7 +344,7 @@
/* If the LKB has been freed then we need to tidy up too */
lkb = dlm_get_lkb(li->li_file->fi_ls->ls_lockspace, li->li_lksb.sb_lkid);
- if (!lkb) {
+ if (!lkb && test_bit(LI_FLAG_ONLIST, &li->li_flags)) {
spin_lock(&li->li_file->fi_lkb_lock);
list_del(&li->li_ownerqueue);
clear_bit(LI_FLAG_ONLIST, &li->li_flags);
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2007-09-12 8:40 pcaulfield
0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-09-12 8:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: pcaulfield at sourceware.org 2007-09-12 08:40:10
Modified files:
dlm-kernel/src : device.c
Log message:
When closing the device, try very hard to release all the locks. In
particular if we get -EBUSY as a status, wwe must wait until the lock
is longer busy.
Fix for PostFinance bug bz#280161
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.24.2.9&r2=1.24.2.10
--- cluster/dlm-kernel/src/Attic/device.c 2006/08/14 21:11:31 1.24.2.9
+++ cluster/dlm-kernel/src/Attic/device.c 2007/09/12 08:40:09 1.24.2.10
@@ -544,13 +544,19 @@
/* If it was waiting for a conversion, it will
now be granted so we can unlock it properly */
- if (lock_status == GDLM_LKSTS_CONVERT) {
- flags &= ~DLM_LKF_CANCEL;
- clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
- status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
+ if (lock_status == GDLM_LKSTS_CONVERT || status == -EBUSY) {
+ do {
+ flags &= ~DLM_LKF_CANCEL;
+ clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
+ status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
- if (status == 0)
- wait_for_ast(&li);
+ if (status == 0)
+ wait_for_ast(&li);
+
+ if (status == -EBUSY)
+ msleep(1);
+
+ } while (status == -EBUSY);
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2007-09-26 13:53 pcaulfield
0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-09-26 13:53 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: pcaulfield at sourceware.org 2007-09-26 13:53:20
Modified files:
dlm-kernel/src : device.c
Log message:
Don't overwrite castparam if there is no new ast routine to go with it.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.24.2.10&r2=1.24.2.11
--- cluster/dlm-kernel/src/Attic/device.c 2007/09/12 08:40:09 1.24.2.10
+++ cluster/dlm-kernel/src/Attic/device.c 2007/09/26 13:53:20 1.24.2.11
@@ -1069,15 +1069,16 @@
}
li->li_user_lksb = kparams->lksb;
- li->li_castparam = kparams->castparam;
li->li_cmd = cmd;
/* dlm_unlock() passes a 0 for castaddr which means don't overwrite
the existing li_castaddr as that's the completion routine for
unlocks. dlm_unlock_wait() specifies a new AST routine to be
executed when the unlock completes. */
- if (kparams->castaddr)
+ if (kparams->castaddr) {
li->li_castaddr = kparams->castaddr;
+ li->li_castparam = kparams->castparam;
+ }
/* Have to do it here cos the lkb may not exist after
* dlm_unlock() */
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2007-10-05 10:06 pcaulfield
0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-10-05 10:06 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: pcaulfield at sourceware.org 2007-10-05 10:06:24
Modified files:
dlm-kernel/src : device.c
Log message:
Don't overwrite castparam if /it/ is NULL.
Checking castaddr is wrong because it's not possible to affect that
from the userland API.
This is also consistent with the fix for bz#318061 in RHEL5.
This check-in fixes bz#318851 but TPTB will decide whether it gets included
in RHEL4.6
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.24.2.11&r2=1.24.2.12
--- cluster/dlm-kernel/src/Attic/device.c 2007/09/26 13:53:20 1.24.2.11
+++ cluster/dlm-kernel/src/Attic/device.c 2007/10/05 10:06:24 1.24.2.12
@@ -1075,10 +1075,10 @@
the existing li_castaddr as that's the completion routine for
unlocks. dlm_unlock_wait() specifies a new AST routine to be
executed when the unlock completes. */
- if (kparams->castaddr) {
+ if (kparams->castaddr)
li->li_castaddr = kparams->castaddr;
+ if (kparams->castparam)
li->li_castparam = kparams->castparam;
- }
/* Have to do it here cos the lkb may not exist after
* dlm_unlock() */
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2007-10-09 7:24 pcaulfield
0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-10-09 7:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL46
Changes by: pcaulfield at sourceware.org 2007-10-09 07:24:12
Modified files:
dlm-kernel/src : device.c
Log message:
Only update castparam if it's non-NULL.
bz#318851
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.24.2.11&r2=1.24.2.11.2.1
--- cluster/dlm-kernel/src/Attic/device.c 2007/09/26 13:53:20 1.24.2.11
+++ cluster/dlm-kernel/src/Attic/device.c 2007/10/09 07:24:12 1.24.2.11.2.1
@@ -1075,10 +1075,10 @@
the existing li_castaddr as that's the completion routine for
unlocks. dlm_unlock_wait() specifies a new AST routine to be
executed when the unlock completes. */
- if (kparams->castaddr) {
+ if (kparams->castaddr)
li->li_castaddr = kparams->castaddr;
+ if (kparams->castparam)
li->li_castparam = kparams->castparam;
- }
/* Have to do it here cos the lkb may not exist after
* dlm_unlock() */
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/dlm-kernel/src device.c
@ 2007-12-05 8:45 pcaulfield
0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-12-05 8:45 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: pcaulfield at sourceware.org 2007-12-05 08:45:54
Modified files:
dlm-kernel/src : device.c
Log message:
Fix for bz#280161
Killing a userland process can leave locks hanging around
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/device.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.24.2.1.4.1.2.9&r2=1.24.2.1.4.1.2.10
--- cluster/dlm-kernel/src/Attic/device.c 2006/08/14 21:13:26 1.24.2.1.4.1.2.9
+++ cluster/dlm-kernel/src/Attic/device.c 2007/12/05 08:45:54 1.24.2.1.4.1.2.10
@@ -544,13 +544,19 @@
/* If it was waiting for a conversion, it will
now be granted so we can unlock it properly */
- if (lock_status == GDLM_LKSTS_CONVERT) {
- flags &= ~DLM_LKF_CANCEL;
- clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
- status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
-
- if (status == 0)
- wait_for_ast(&li);
+ if (lock_status == GDLM_LKSTS_CONVERT || status == -EBUSY) {
+ do {
+ flags &= ~DLM_LKF_CANCEL;
+ clear_bit(LI_FLAG_COMPLETE, &li.li_flags);
+ status = dlm_unlock(f->fi_ls->ls_lockspace, lkb->lkb_id, flags, &li.li_lksb, &li);
+
+ if (status == 0)
+ wait_for_ast(&li);
+
+ if (status == -EBUSY) {
+ msleep(1);
+ }
+ } while (status == -EBUSY);
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-12-05 8:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-12 8:40 [Cluster-devel] cluster/dlm-kernel/src device.c pcaulfield
-- strict thread matches above, loose matches on Subject: below --
2007-12-05 8:45 pcaulfield
2007-10-09 7:24 pcaulfield
2007-10-05 10:06 pcaulfield
2007-09-26 13:53 pcaulfield
2006-08-14 21:13 teigland
2006-08-14 21:11 teigland
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).