search for: extent_user_data

Displaying 9 results from an estimated 9 matches for "extent_user_data".

2019 Jul 22
1
Re: [libnbd] More thoughts on callbacks and more
This has an annoying subtlety around the fact that we can pass a single user_data and multiple closures in one function call. The LIBNBD_CALLBACK_FREE function would be called several times with the same user_data in this case, which means the callback must do some kind of reference counting before the user_data can be freed. I propose that we split up Closure so it describes a single closure,
2019 Aug 13
0
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...t64_t nbd_unlocked_aio_block_status (struct nbd_handle *h, uint64_t count, uint64_t offset, - nbd_extent_callback extent, void *user_data, + nbd_extent_callback extent, + void *extent_user_data, + nbd_completion_callback completion, + void *callback_user_data, uint32_t flags) -{ - return nbd_unlocked_aio_block_status_callback (h, count, offset, - ext...
2019 Aug 13
2
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
This applies on top of the OClosure v2 series posted a few minutes ago. Rich.
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...d_aio_block_status_callback (struct nbd_handle *h, uint64_t count, uint64_t offset, - extent_fn extent, + nbd_extent_callback extent, void *extent_user_data, - callback_fn callback, + nbd_completion_callback completion, void *callback_user_data, uint32_t flags) { struct command_cb cb = { .fn...
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...uot;server does not support write operations"); @@ -454,15 +450,11 @@ int64_t nbd_unlocked_aio_block_status (struct nbd_handle *h, uint64_t count, uint64_t offset, nbd_extent_callback extent, - void *extent_user_data, nbd_completion_callback completion, - void *callback_user_data, uint32_t flags) { struct command_cb cb = { .fn.extent = extent, - .fn_user_data = extent_user_data, -...
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
...uint64_t count, uint64_t offset, - extent_fn extent, callback_fn callback, - void *user_data, uint32_t flags) + extent_fn extent, + void *extent_user_data, + callback_fn callback, + void *callback_user_data, + uint32_t flags) { - struct command_cb cb = { .fn.extent = extent, .callback = callback, - .user_dat...
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.
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 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass closures + user_data + free function in single struct parameters as I described previously in this email: https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile simplification if you buy into 1 & 2. Patch 4 adds another macro which is