Displaying 2 results from an estimated 2 matches for "nbd_aio_threaded_read".
2019 Jun 01
0
Re: [libnbd] Simultaneous read and write
...r own thread. The caller will be required to set up a
second thread which does basically:
pthread_create (start_second_thread);
start_second_thread ()
{
int fd = nbd_aio_get_fd (nbd);
char buf[BUFSIZ];
for (;;) {
poll (fd);
len = recv (fd, buf, sizeof buf, 0);
nbd_aio_threaded_read (fd, buf, len);
}
}
Note this doesn't require any changes to the state machine, and
probably not any changes to the existing main loop. The state machine
still runs through the same states as before, it's just that when it's
reading from the socket, instead of those reads coming...
2019 May 31
4
[libnbd] Simultaneous read and write
This is a continuation of a discussion we were having on IRC. The
problems with IRC are it's not recorded and it's hard to have deep
technical conversations. I hope this is a decent summary.
Problem simply stated: Certain NBD servers (qemu-nbd in particular)
are able to simultaneously read and write on a socket. ie. They can
be simultaneously reading a request and writing the reply to