Displaying 3 results from an estimated 3 matches for "ae0d196".
2019 Aug 12
0
[PATCH libnbd 2/7] lib: Allow retired commands to use free_callback on their buffer.
...d_completed (struct nbd_handle *h,
else
h->cmds_done = cmd->next;
- nbd_internal_retire_and_free_command (cmd);
+ nbd_internal_retire_and_free_command (h, cmd);
/* If the command was successful, return true. */
if (error == 0)
diff --git a/lib/handle.c b/lib/handle.c
index ae0d196..0f50e38 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -32,13 +32,13 @@
#include "internal.h"
static void
-free_cmd_list (struct command *list)
+free_cmd_list (struct nbd_handle *h, struct command *list)
{
struct command *cmd, *cmd_next;
for (cmd = list; cmd != NULL; cmd =...
2019 Aug 12
0
[PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...+ /* Remove it from the free list. */
+ memmove (free_cb, free_cb+1,
+ sizeof (struct free_callback) *
+ (&h->free_callbacks[h->nr_free_callbacks] - (free_cb+1)));
+ h->nr_free_callbacks--;
+ }
+}
diff --git a/lib/handle.c b/lib/handle.c
index 054c8a7..ae0d196 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -126,6 +126,12 @@ nbd_close (struct nbd_handle *h)
free_cmd_list (h->cmds_to_issue);
free_cmd_list (h->cmds_in_flight);
free_cmd_list (h->cmds_done);
+
+ /* Any remaining free callbacks indicate an error. */
+ if (h->nr_free_cal...
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here:
https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html
I didn't actually read Eric's replies to that yet because I've been
concentrating on writing these patches all day. Anyway here they are
and I'll look at what Eric said about the proposal next.
Rich.