Displaying 7 results from an estimated 7 matches for "nbd_free_callback".
2019 Aug 11
3
[PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...pr " nbd_close;\n";
pr " nbd_get_errno;\n";
@@ -3581,6 +3582,12 @@ let generate_include_libnbd_h () =
pr "extern int nbd_get_errno (void);\n";
pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n";
pr "\n";
+ pr "typedef void (*nbd_free_callback) (void *ptr);\n";
+ pr "extern int nbd_add_free_callback (struct nbd_handle *h,\n";
+ pr " nbd_free_callback cb,\n";
+ pr " void *ptr);\n";
+ pr "#define LIBNBD_HAVE_NBD_ADD_FREE_CALLBACK 1...
2019 Aug 12
0
[PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...pr " nbd_close;\n";
pr " nbd_get_errno;\n";
@@ -3581,6 +3582,13 @@ let generate_include_libnbd_h () =
pr "extern int nbd_get_errno (void);\n";
pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n";
pr "\n";
+ pr "typedef void (*nbd_free_callback) (void *ptr, void *user_data);\n";
+ pr "extern int nbd_add_free_callback (struct nbd_handle *h,\n";
+ pr " void *ptr,\n";
+ pr " nbd_free_callback cb,\n";
+ pr "...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...ude pointers to buffers
> +passed to C<nbd_aio_pread>, C<nbd_aio_pwrite>, etc.,
> +and pointers to the C<user_data> for callbacks. If you
> +want to know when it is safe to free these objects then
> +you can register a free callback using:
> +
> + typedef void (*nbd_free_callback) (void *ptr, void *user_data);
> + int nbd_add_free_callback (struct nbd_handle *h,
> + void *ptr,
> + nbd_free_callback cb,
> + void *user_data);
Do we want to insist on a user_data argument? Libvirt, fo...
2019 Aug 12
0
Re: [PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...uot;;
> pr " nbd_get_errno;\n";
> @@ -3581,6 +3582,12 @@ let generate_include_libnbd_h () =
> pr "extern int nbd_get_errno (void);\n";
> pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n";
> pr "\n";
> + pr "typedef void (*nbd_free_callback) (void *ptr);\n";
> + pr "extern int nbd_add_free_callback (struct nbd_handle *h,\n";
> + pr " nbd_free_callback cb,\n";
> + pr " void *ptr);\n";
> + pr "#define LIBNBD_HAVE_NBD...
2019 Aug 12
0
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On Mon, Aug 12, 2019 at 11:29:10AM -0500, Eric Blake wrote:
> On 8/12/19 11:08 AM, Richard W.M. Jones wrote:
> > + typedef void (*nbd_free_callback) (void *ptr, void *user_data);
> > + int nbd_add_free_callback (struct nbd_handle *h,
> > + void *ptr,
> > + nbd_free_callback cb,
> > + void *user_data);
>
> Do we want to insist on a us...
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 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On 8/12/19 1:13 PM, Richard W.M. Jones wrote:
> On Mon, Aug 12, 2019 at 11:29:10AM -0500, Eric Blake wrote:
>> On 8/12/19 11:08 AM, Richard W.M. Jones wrote:
>>> + typedef void (*nbd_free_callback) (void *ptr, void *user_data);
>>> + int nbd_add_free_callback (struct nbd_handle *h,
>>> + void *ptr,
>>> + nbd_free_callback cb,
>>> + void *user_data);
>>
>> Do we wan...