search for: nbd_unlocked_aio_notify_read

Displaying 3 results from an estimated 3 matches for "nbd_unlocked_aio_notify_read".

2019 Jun 27
0
[libnbd PATCH 2/2] poll: Improve our interface
...will be picked up by a - * subsequent poll. + * subsequent poll. Prefer notifying on read, since the reply is + * for a command older than what we are trying to write. */ r = 0; - if ((fds[0].revents & POLLIN) != 0) + if ((fds[0].revents & (POLLIN | POLLHUP)) != 0) r = nbd_unlocked_aio_notify_read (h); else if ((fds[0].revents & POLLOUT) != 0) r = nbd_unlocked_aio_notify_write (h); + else if ((fds[0].revents & (POLLERR | POLLNVAL)) != 0) { + set_error (ENOTCONN, "server closed socket unexpectedly"); + return -1; + } if (r == -1) return -1; - return...
2019 Jun 27
3
[libnbd PATCH 0/2] socket handling cleanups
While working on a new test of what happens when the server goes away while commands are in flight, I managed to hit a race where I hit death from SIGPIPE instead of a clean transition to the DEAD state. I also found myself wanting to use nbd_poll from the test, but with a way to distinguish between the state machine progressing vs. hanging. Eric Blake (2): socket: Avoid SIGPIPE where possible
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must