* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2006-07-12 7:47 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2006-07-12 7:47 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2006-07-12 07:47:47
Modified files:
dlm/lib : libdlm.c
Log message:
Don't lose the end of a lock name
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&r1=1.31&r2=1.32
--- cluster/dlm/lib/libdlm.c 2006/06/15 09:34:42 1.31
+++ cluster/dlm/lib/libdlm.c 2006/07/12 07:47:47 1.32
@@ -619,7 +619,7 @@
{
memcpy(req->i.lock.lvb, lksb->sb_lvbptr, DLM_LVB_LEN);
}
- len = sizeof(struct dlm_write_request) + namelen - 1;
+ len = sizeof(struct dlm_write_request) + namelen;
lksb->sb_status = EINPROG;
if (flags & LKF_WAIT)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-01-31 10:53 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-01-31 10:53 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2007-01-31 10:53:47
Modified files:
dlm/lib : libdlm.c
Log message:
Read the LVB every time, rather than not at all.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&r1=1.32&r2=1.33
--- cluster/dlm/lib/libdlm.c 2006/07/12 07:47:47 1.32
+++ cluster/dlm/lib/libdlm.c 2007/01/31 10:53:47 1.33
@@ -406,14 +406,14 @@
static int do_dlm_dispatch(int fd)
{
- struct dlm_lock_result resultbuf;
- struct dlm_lock_result *result = &resultbuf;
+ char resultbuf[sizeof(struct dlm_lock_result) + DLM_USER_LVB_LEN];
+ struct dlm_lock_result *result = (struct dlm_lock_result *)resultbuf;
char *fullresult = NULL;
int status;
void (*astaddr)(void *astarg);
- /* Just read the header first */
- status = read(fd, result, sizeof(struct dlm_lock_result));
+ /* Just read the header & LVB first */
+ status = read(fd, result, sizeof(resultbuf));
if (status <= 0)
return -1;
@@ -433,6 +433,10 @@
if (newstat == result->length)
result = (struct dlm_lock_result *)fullresult;
}
+ else
+ {
+ fullresult = resultbuf;
+ }
/* Copy lksb to user's buffer - except the LVB ptr */
memcpy(result->user_lksb, &result->lksb, sizeof(struct dlm_lksb) - sizeof(char*));
@@ -468,7 +472,7 @@
astaddr(result->user_astparam);
}
- if (fullresult)
+ if (fullresult != resultbuf)
free(fullresult);
return 0;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-01-31 11:16 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-01-31 11:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: pcaulfield at sourceware.org 2007-01-31 11:16:05
Modified files:
dlm/lib : libdlm.c
Log message:
Read the LVB every time, rather than not at all.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.32&r2=1.32.2.1
--- cluster/dlm/lib/libdlm.c 2006/07/12 07:47:47 1.32
+++ cluster/dlm/lib/libdlm.c 2007/01/31 11:16:04 1.32.2.1
@@ -406,14 +406,14 @@
static int do_dlm_dispatch(int fd)
{
- struct dlm_lock_result resultbuf;
- struct dlm_lock_result *result = &resultbuf;
+ char resultbuf[sizeof(struct dlm_lock_result) + DLM_USER_LVB_LEN];
+ struct dlm_lock_result *result = (struct dlm_lock_result *)resultbuf;
char *fullresult = NULL;
int status;
void (*astaddr)(void *astarg);
- /* Just read the header first */
- status = read(fd, result, sizeof(struct dlm_lock_result));
+ /* Just read the header & LVB first */
+ status = read(fd, result, sizeof(resultbuf));
if (status <= 0)
return -1;
@@ -433,6 +433,10 @@
if (newstat == result->length)
result = (struct dlm_lock_result *)fullresult;
}
+ else
+ {
+ fullresult = resultbuf;
+ }
/* Copy lksb to user's buffer - except the LVB ptr */
memcpy(result->user_lksb, &result->lksb, sizeof(struct dlm_lksb) - sizeof(char*));
@@ -468,7 +472,7 @@
astaddr(result->user_astparam);
}
- if (fullresult)
+ if (fullresult != resultbuf)
free(fullresult);
return 0;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-05-31 13:46 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-05-31 13:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2007-05-31 13:46:35
Modified files:
dlm/lib : libdlm.c
Log message:
open_lockspace needs to detect kernel version too, otherwise all lockops
will fail mysteriously.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&r1=1.35&r2=1.36
--- cluster/dlm/lib/libdlm.c 2007/05/30 18:18:02 1.35
+++ cluster/dlm/lib/libdlm.c 2007/05/31 13:46:35 1.36
@@ -1462,6 +1462,10 @@
struct dlm_ls_info *newls;
int saved_errno;
+ /* Need to detect kernel version */
+ if (open_control_device())
+ return NULL;
+
newls = malloc(sizeof(struct dlm_ls_info));
if (!newls)
return NULL;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-07-05 8:08 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-07-05 8:08 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: pcaulfield at sourceware.org 2007-07-05 08:08:22
Modified files:
dlm/lib : libdlm.c
Log message:
Honour the mode parameter to dlm_create_lockspace() even if the
device node was created by udev.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.15.2.3&r2=1.15.2.4
--- cluster/dlm/lib/libdlm.c 2006/01/06 15:17:34 1.15.2.3
+++ cluster/dlm/lib/libdlm.c 2007/07/05 08:08:22 1.15.2.4
@@ -1028,6 +1028,8 @@
}
newls->tid = 0;
fcntl(newls->fd, F_SETFD, 1);
+ if (mode)
+ fchmod(newls->fd, mode);
return (dlm_lshandle_t)newls;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-07-05 8:24 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-07-05 8:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2007-07-05 08:24:05
Modified files:
dlm/lib : libdlm.c
Log message:
Honour the mode parameter to dlm_create_lockspace() even if the
device node was created by udev.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&r1=1.36&r2=1.37
--- cluster/dlm/lib/libdlm.c 2007/05/31 13:46:35 1.36
+++ cluster/dlm/lib/libdlm.c 2007/07/05 08:24:05 1.37
@@ -1371,6 +1371,8 @@
errno = saved_errno;
return NULL;
}
+ if (mode)
+ fchmod(newls->fd, mode);
newls->tid = 0;
fcntl(newls->fd, F_SETFD, 1);
return (dlm_lshandle_t)newls;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2007-10-17 18:13 teigland
0 siblings, 0 replies; 10+ messages in thread
From: teigland @ 2007-10-17 18:13 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-10-17 18:13:41
Modified files:
dlm/lib : libdlm.c
Log message:
Honour the mode parameter to dlm_create_lockspace() even if the
device node was created by udev.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.32.2.2&r2=1.32.2.3
--- cluster/dlm/lib/libdlm.c 2007/06/05 16:35:00 1.32.2.2
+++ cluster/dlm/lib/libdlm.c 2007/10/17 18:13:41 1.32.2.3
@@ -1371,6 +1371,8 @@
errno = saved_errno;
return NULL;
}
+ if (mode)
+ fchmod(newls->fd, mode);
newls->tid = 0;
fcntl(newls->fd, F_SETFD, 1);
return (dlm_lshandle_t)newls;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2008-01-16 17:25 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2008-01-16 17:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield at sourceware.org 2008-01-16 17:25:48
Modified files:
dlm/lib : libdlm.c
Log message:
Zero namelen when doing an unlock. On 32/64 bit systems it can make a
horrible mess otherwise.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&r1=1.37&r2=1.38
--- cluster/dlm/lib/libdlm.c 2007/07/05 08:24:05 1.37
+++ cluster/dlm/lib/libdlm.c 2008/01/16 17:25:48 1.38
@@ -1037,6 +1037,7 @@
req.i.lock.lkid = lkid;
req.i.lock.flags = flags;
req.i.lock.lksb = lksb;
+ req.i.lock.namelen = 0;
req.i.lock.castparam = astarg;
/* DLM_USER_UNLOCK will default to existing completion AST */
req.i.lock.castaddr = 0;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2008-01-17 9:40 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2008-01-17 9:40 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: pcaulfield at sourceware.org 2008-01-17 09:40:12
Modified files:
dlm/lib : libdlm.c
Log message:
Zero namelen when doing an unlock. On 32/64 bit systems it can make a
horrible mess otherwise.
bz#409221 has the gory details
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.32.2.3&r2=1.32.2.4
--- cluster/dlm/lib/libdlm.c 2007/10/17 18:13:41 1.32.2.3
+++ cluster/dlm/lib/libdlm.c 2008/01/17 09:40:11 1.32.2.4
@@ -1034,6 +1034,7 @@
set_version_v6(&req);
req.cmd = DLM_USER_UNLOCK;
+ req.i.lock.namelen = 0;
req.i.lock.lkid = lkid;
req.i.lock.flags = flags;
req.i.lock.lksb = lksb;
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] cluster/dlm/lib libdlm.c
@ 2008-01-17 16:54 cfeist
0 siblings, 0 replies; 10+ messages in thread
From: cfeist @ 2008-01-17 16:54 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL51
Changes by: cfeist at sourceware.org 2008-01-17 16:54:22
Modified files:
dlm/lib : libdlm.c
Log message:
Pulled from RHEL5 branch
Zero namelen when doing an unlock. On 32/64 bit systems it can make a
horrible mess otherwise.
bz#409221 has the gory details
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/lib/libdlm.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.32.2.2&r2=1.32.2.2.2.1
--- cluster/dlm/lib/libdlm.c 2007/06/05 16:35:00 1.32.2.2
+++ cluster/dlm/lib/libdlm.c 2008/01/17 16:54:21 1.32.2.2.2.1
@@ -1034,6 +1034,7 @@
set_version_v6(&req);
req.cmd = DLM_USER_UNLOCK;
+ req.i.lock.namelen = 0;
req.i.lock.lkid = lkid;
req.i.lock.flags = flags;
req.i.lock.lksb = lksb;
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-01-17 16:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 13:46 [Cluster-devel] cluster/dlm/lib libdlm.c pcaulfield
-- strict thread matches above, loose matches on Subject: below --
2008-01-17 16:54 cfeist
2008-01-17 9:40 pcaulfield
2008-01-16 17:25 pcaulfield
2007-10-17 18:13 teigland
2007-07-05 8:24 pcaulfield
2007-07-05 8:08 pcaulfield
2007-01-31 11:16 pcaulfield
2007-01-31 10:53 pcaulfield
2006-07-12 7:47 pcaulfield
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).