search for: cmd_next

Displaying 5 results from an estimated 5 matches for "cmd_next".

Did you mean: cap_next
2019 Aug 12
0
[PATCH libnbd 2/7] lib: Allow retired commands to use free_callback on their buffer.
...f --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 = cmd_next) { cmd_next = cmd->next; - nbd_internal_retire_and_free_command (cmd); + nbd_internal_retire_and_free_command (h, cmd); } } @@ -123,9 +123,9 @@ nbd_close (struct nbd_handle *h) free (m->name); free (m); } - free...
2023 Jul 13
2
[libnbd PATCH 0/2] Fix docs and testing of completion callback
This is my proposal for fixing the documentation to match practice (namely, that completion.callback is not invoked in the cases where the aio call itself reports errors); we could instead try to go the other direction and tweak the generator to guarantee that both completion.callback and completion.free are reached no matter what, but that felt more invasive to me. Eric Blake (2): api: Tighten
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...tf (stderr, "libnbd: debug: %s: %s\n", context ? : "unknown", msg); out: diff --git a/lib/handle.c b/lib/handle.c index 9c643d8..6f5a4d6 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -35,7 +35,7 @@ free_cmd_list (struct command *list) for (cmd = list; cmd != NULL; cmd = cmd_next) { cmd_next = cmd->next; - free (cmd); + nbd_internal_retire_and_free_command (cmd); } } @@ -96,6 +96,10 @@ nbd_close (struct nbd_handle *h) if (h == NULL) return; + /* Free user callbacks first. */ + if (h->debug_fn) + h->debug_fn (LIBNBD_CALLBACK_FREE, h-&...
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.
2019 Jul 25
4
[PATCH libnbd v3 0/2] lib: Implement closure lifetimes.
I think I've addressed everything that was raised in review. Some of the highlights: - Callbacks should be freed reliably along all exit paths. - There's a simple test of closure lifetimes. - I've tried to use VALID|FREE in all the places where I'm confident that it's safe and correct to do. There may be more places. Note this is an optimization and shouldn't