search for: libnbd_aio_direction_both

Displaying 4 results from an estimated 4 matches for "libnbd_aio_direction_both".

2019 Jun 27
1
Re: [libnbd PATCH 2/2] poll: Improve our interface
...to fix our use of an uninitialized variable when nbd_aio_get_direction returns 0 (such as when we are already DEAD): diff --git i/lib/poll.c w/lib/poll.c index d356afe..fc6aae5 100644 --- i/lib/poll.c +++ w/lib/poll.c @@ -45,6 +45,8 @@ nbd_unlocked_poll (struct nbd_handle *h, int timeout) case LIBNBD_AIO_DIRECTION_BOTH: fds[0].events = POLLIN|POLLOUT; break; + default: + fds[0].events = 0; } fds[0].revents = 0; -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
2019 Jun 20
2
[libnbd PATCH] docs: Improve nbd_aio_get_direction documentation
...lt;pthread_kill(3)> to send a signal that is +masked except during L<ppoll(2)>. + =item C<LIBNBD_AIO_DIRECTION_WRITE> = 2 We are expected next to write to the server. If using L<poll(2)> @@ -1727,13 +1739,12 @@ you would then call C<nbd_aio_notify_write>. =item C<LIBNBD_AIO_DIRECTION_BOTH> = 3 -We are expected next to either read or write to the server. -If using L<poll(2)> you would set C<events = POLLIN|POLLOUT>. -If one of C<POLLIN> or C<POLLOUT> is returned, then see above. -However note that you shouldn't call C<nbd_aio_notify_read> -and C&...
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