1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 -
====================================
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.
Limit the max size of processed clvmd message to ~8KB.
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 */
uint32_t *header = alloca(size);
char *buf = (char *)header;
struct stat fstatbuf;
while (bytes < size) {
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");
return 0;
}
/* Check whether fifo is still alive */
if ((ret == 0) &&
fstat(fifos->server + 1, &fstatbuf) &&
(errno == EBADF)) {
log_error("Fifo fd is bad for event server.");
if ((ret == 0) && i && !bytes) {
log_error("No input from event server.");
return 0;
}
}