Displaying 2 results from an estimated 2 matches for "4093c20".
2019 Jul 18
3
[libnbd PATCH 0/2] in_flight improvements
Noticed while thinking about the recent threads wondering if we need a
more efficient lookup from cookie back to command.  Both of these fix
bugs, but are tricky enough that I'm posting for review.
Eric Blake (2):
  lib: Decrement in_flight at response, not retirement
  lib: Do O(1) rather than O(n) queue insertion
 generator/states-issue-command.c |  2 ++
 generator/states-reply.c         |
2019 Jul 23
4
[libnbd PATCH] api: Allow completion callbacks to auto-retire
...sert (h->cmds_done->type != NBD_CMD_DISC);
     return h->cmds_done->cookie;
+  }
   if (h->cmds_in_flight != NULL || h->cmds_to_issue != NULL) {
     set_error (0, "no in-flight command has completed yet");
diff --git a/tests/server-death.c b/tests/server-death.c
index 4093c20..08e5358 100644
--- a/tests/server-death.c
+++ b/tests/server-death.c
@@ -30,6 +30,21 @@
 #include <libnbd.h>
+static bool trim_retired;
+static const char *progname;
+
+static int
+callback (void *ignored, int64_t cookie, int *error)
+{
+  if (*error != ENOTCONN) {
+    fprintf (stderr, &q...