Displaying 4 results from an estimated 4 matches for "054c8a7".
2019 Aug 13
0
[PATCH libnbd v2 3/3] api: Add nbd_clear_debug_callback.
...(LIBNBD_CALLBACK_FREE, h->debug_data, NULL, NULL);
+ /* This can't fail at the moment - see implementation above. */
+ nbd_unlocked_clear_debug_callback (h);
+
h->debug_callback = debug_callback;
h->debug_data = data;
return 0;
diff --git a/lib/handle.c b/lib/handle.c
index 054c8a7..d599eef 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -113,9 +113,7 @@ nbd_close (struct nbd_handle *h)
return;
/* Free user callbacks first. */
- if (h->debug_callback)
- h->debug_callback (LIBNBD_CALLBACK_FREE, h->debug_data, NULL, NULL);
- h->debug_callback = NULL;...
2019 Aug 12
0
[PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...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...
2019 Aug 13
7
[PATCH libnbd v2 0/3] Implement OClosures.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-August/msg00168.html
I pushed uncontroversial patches 1-4
v2:
- The implementation of OClosure (new patch 1) in Python is fixed.
- Patch 2 (old patch 5) is unchanged.
- I added a new API for removing debug callbacks. I think this
approach has some advantages over using OClosure.
- I didn't yet do any work on changing the
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.