FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-05-2007, 07:45 AM
 
Default cluster/dlm-kernel/src device.c

CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: pcaulfield@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);
}
}
 

Thread Tools




All times are GMT. The time now is 06:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org