mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Fix off-by-one error in cluster_locking that could case read hangs.
This commit is contained in:
parent
99dffafbb2
commit
b9fb9b206e
@ -5,6 +5,7 @@ Version 2.00.33 -
|
||||
gulm clvmd now doesn't ignore the first node in cluster.conf
|
||||
Improve clvmd failure message if it's already running.
|
||||
Allow user to kill clvmd during initialisation.
|
||||
Fix off-by-one error in cluster_locking that could cause read hangs.
|
||||
|
||||
Version 2.00.32 - 22nd December 2004
|
||||
====================================
|
||||
|
@ -1313,6 +1313,7 @@ static void *pre_and_post_thread(void *arg)
|
||||
|
||||
DEBUGLOG("Got post command condition...\n");
|
||||
|
||||
status = 0;
|
||||
do_post_command(client);
|
||||
|
||||
write(pipe_fd, &status, sizeof(int));
|
||||
|
@ -139,8 +139,7 @@ static int _send_request(char *inbuf, int inlen, char **retbuf)
|
||||
|
||||
/* Read the returned values */
|
||||
off = 1; /* we've already read the first byte */
|
||||
|
||||
while (off < outheader->arglen && len > 0) {
|
||||
while (off <= outheader->arglen && len > 0) {
|
||||
len = read(_clvmd_sock, outheader->args + off,
|
||||
buflen - off - offsetof(struct clvm_header, args));
|
||||
if (len > 0)
|
||||
@ -150,7 +149,7 @@ static int _send_request(char *inbuf, int inlen, char **retbuf)
|
||||
/* Was it an error ? */
|
||||
if (outheader->status < 0) {
|
||||
errno = -outheader->status;
|
||||
log_error("cluster send request failed: %s", strerror(errno));
|
||||
log_error("cluster request failed: %s", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user