search for: 12c10f7

Displaying 9 results from an estimated 9 matches for "12c10f7".

Did you mean: 1210,7
2019 Jul 24
2
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...callbacks could still be done as a patch on top of your initial implementation, rather than making you have to spin a v3, since our mails have crossed. > + > free (cmd); > > /* If the command was successful, return true. */ > diff --git a/lib/debug.c b/lib/debug.c > index 12c10f7..56a9455 100644 > --- a/lib/debug.c > +++ b/lib/debug.c > @@ -40,9 +40,12 @@ nbd_unlocked_get_debug (struct nbd_handle *h) > > int > nbd_unlocked_set_debug_callback (struct nbd_handle *h, > - int (*debug_fn) (void *, const char *, const char...
2019 Jul 24
0
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
...the FREE version when a command is aborted. It's complicated to know if we called cb.fn.read already. But thinking about this a bit more, maybe we should call VALID|FREE here and set cmd->cb.fn.read = NULL afterwards. [...] > > diff --git a/lib/debug.c b/lib/debug.c > > index 12c10f7..56a9455 100644 > > --- a/lib/debug.c > > +++ b/lib/debug.c > > @@ -40,9 +40,12 @@ nbd_unlocked_get_debug (struct nbd_handle *h) > > > > int > > nbd_unlocked_set_debug_callback (struct nbd_handle *h, > > - int (*debug_fn)...
2019 Jul 16
1
[libnbd PATCH] generator: Prefer closure opaque after function pointer in C
..., 2048, &data, read_cb, + if (nbd_pread_structured (nbd, rbuf, sizeof rbuf, 2048, read_cb, &data, 0) != -1) { fprintf (stderr, "unexpected pread callback success\n"); exit (EXIT_FAILURE); diff --git a/lib/debug.c b/lib/debug.c index 02d49f7..12c10f7 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -40,8 +40,8 @@ nbd_unlocked_get_debug (struct nbd_handle *h) int nbd_unlocked_set_debug_callback (struct nbd_handle *h, - void *data, - int (*debug_fn) (void *, const char *, const char...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...r_data, + NULL, 0, 0, 0, NULL); + if (cmd->cb.callback) + cmd->cb.callback (LIBNBD_CALLBACK_FREE, cmd->cb.user_data, + 0, NULL); + free (cmd); /* If the command was successful, return true. */ diff --git a/lib/debug.c b/lib/debug.c index 12c10f7..56a9455 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -40,9 +40,12 @@ nbd_unlocked_get_debug (struct nbd_handle *h) int nbd_unlocked_set_debug_callback (struct nbd_handle *h, - int (*debug_fn) (void *, const char *, const char *), +...
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...r_data, + NULL, 0, 0, 0, NULL); + if (cmd->cb.callback) + cmd->cb.callback (LIBNBD_CALLBACK_FREE, cmd->cb.user_data, + 0, NULL); + free (cmd); /* If the command was successful, return true. */ diff --git a/lib/debug.c b/lib/debug.c index 12c10f7..7784bd9 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -40,9 +40,11 @@ nbd_unlocked_get_debug (struct nbd_handle *h) int nbd_unlocked_set_debug_callback (struct nbd_handle *h, - int (*debug_fn) (void *, const char *, const char *), -...
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...1,7 +109,7 @@ nbd_unlocked_aio_command_completed (struct nbd_handle *h, else h->cmds_done = cmd->next; - free (cmd); + nbd_internal_retire_and_free_command (cmd); /* If the command was successful, return true. */ if (error == 0) diff --git a/lib/debug.c b/lib/debug.c index 12c10f7..7784bd9 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -40,9 +40,11 @@ nbd_unlocked_get_debug (struct nbd_handle *h) int nbd_unlocked_set_debug_callback (struct nbd_handle *h, - int (*debug_fn) (void *, const char *, const char *), -...
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
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
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231 The changes address everything that Eric picked up in his review of the first two patches. I have also added two more patches (4 and 5) which respectively fix docs and change int status -> unsigned status, as discussed. Passes make, check, check-valgrind. Rich.