search for: 6b57f11

Displaying 3 results from an estimated 3 matches for "6b57f11".

2019 Jun 28
1
[libnbd PATCH] disconnect: Prevent any further commands
...mmand_in_flight *cmds_to_issue, *cmds_in_flight, *cmds_done; /* Current command during a REPLY cycle */ struct command_in_flight *reply_cmd; + + bool disconnect_request; /* True if we've sent NBD_CMD_DISC */ }; struct meta_context { diff --git a/lib/rw.c b/lib/rw.c index 2dc60de..6b57f11 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -163,6 +163,11 @@ nbd_internal_command_common (struct nbd_handle *h, { struct command_in_flight *cmd, *prev_cmd; + if (h->disconnect_request) { + set_error (EINVAL, "cannot request more commands after NBD_CMD_DISC"); + return -1;...
2019 Jun 29
0
[libnbd PATCH 1/6] api: Add nbd_aio_in_flight
...e them. in_flight tracks the combined length of the + * first two lists. */ struct command_in_flight *cmds_to_issue, *cmds_in_flight, *cmds_done; + int in_flight; /* Current command during a REPLY cycle */ struct command_in_flight *reply_cmd; diff --git a/lib/rw.c b/lib/rw.c index 6b57f11..53cd521 100644 --- a/lib/rw.c +++ b/lib/rw.c @@ -25,6 +25,7 @@ #include <inttypes.h> #include <errno.h> #include <assert.h> +#include <limits.h> #include "internal.h" @@ -167,6 +168,10 @@ nbd_internal_command_common (struct nbd_handle *h, set_error (E...
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to prove whether it makes the code any faster or easier to maintain, but at least the added example shows one good use case for the new API. Eric Blake (6): api: Add nbd_aio_in_flight generator: Allow DEAD state actions to run generator: Allow Int64 in callbacks states: Prepare for aio notify callback api: Add new