1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Better detection of missing dmeventd fifo connection

This commit is contained in:
Zdenek Kabelac 2012-02-28 11:03:24 +00:00
parent e5d399f667
commit c19d86338d
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,7 @@
Version 2.02.94 - Version 2.02.94 -
==================================== ====================================
Better detection of missing dmeventd fifo connection (2.02.93).
Add some close() and dev_close() error path backtraces.
For polling daemon reopen stdin,stdout,stderr to /dev/null. For polling daemon reopen stdin,stdout,stderr to /dev/null.
Limit the max size of processed clvmd message to ~8KB. Limit the max size of processed clvmd message to ~8KB.
Do not send uninitilised bytes in cluster error reply messages. Do not send uninitilised bytes in cluster error reply messages.

View File

@ -232,7 +232,6 @@ static int _daemon_read(struct dm_event_fifos *fifos,
size_t size = 2 * sizeof(uint32_t); /* status + size */ size_t size = 2 * sizeof(uint32_t); /* status + size */
uint32_t *header = alloca(size); uint32_t *header = alloca(size);
char *buf = (char *)header; char *buf = (char *)header;
struct stat fstatbuf;
while (bytes < size) { while (bytes < size) {
for (i = 0, ret = 0; (i < 20) && (ret < 1); i++) { for (i = 0, ret = 0; (i < 20) && (ret < 1); i++) {
@ -246,11 +245,8 @@ static int _daemon_read(struct dm_event_fifos *fifos,
log_error("Unable to read from event server"); log_error("Unable to read from event server");
return 0; return 0;
} }
/* Check whether fifo is still alive */ if ((ret == 0) && i && !bytes) {
if ((ret == 0) && log_error("No input from event server.");
fstat(fifos->server + 1, &fstatbuf) &&
(errno == EBADF)) {
log_error("Fifo fd is bad for event server.");
return 0; return 0;
} }
} }