similar to: [PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.

Displaying 20 results from an estimated 500 matches similar to: "[PATCH libnbd proposal] api: Add semi-private function for freeing persistent data."

2019 Aug 12
0
Re: [PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
On 8/11/19 8:03 AM, Richard W.M. Jones wrote: > This adds a C-only semi-private function for freeing various types of > persistent data passed to libnbd. > > There are some similarities with nbd_add_close_callback which we > removed in commit 7f191b150b52ed50098976309a6af883d245fc56. > --- > generator/generator | 46 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file
2019 Aug 12
0
[PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
This adds a C-only semi-private function for freeing various types of persistent data passed to libnbd. There are some similarities with nbd_add_close_callback which we removed in commit 7f191b150b52ed50098976309a6af883d245fc56. --- generator/generator | 57 ++++++++++++++++++++ lib/Makefile.am | 1 + lib/free.c | 129 ++++++++++++++++++++++++++++++++++++++++++++ lib/handle.c
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 11:08 AM, Richard W.M. Jones wrote: > This adds a C-only semi-private function for freeing various types of > persistent data passed to libnbd. > > There are some similarities with nbd_add_close_callback which we > removed in commit 7f191b150b52ed50098976309a6af883d245fc56. > --- > +=head1 FREE CALLBACKS > + > +B<Note:> The API described in this
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, >>> +
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, > > +
2019 Aug 12
0
[PATCH libnbd 3/7] ocaml: Remove NBD.Buffer.free function, use a free callback instead.
By using the free callback mechanism we don't need to manually free the buffer. This reverts part of commit fef1c281a65d061127bf178e5f8cfca0a2475c56. --- generator/generator | 43 +++++++++++++++++++++----------- ocaml/buffer.c | 22 ---------------- ocaml/examples/asynch_copy.ml | 4 +-- ocaml/libnbd-ocaml.pod | 22 ---------------- ocaml/nbd-c.h
2019 Aug 11
4
[PATCH libnbd v2 0/3] python: Add test for doing asynch copy.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-August/msg00103.html In v2 I've made several changes: - Fix Python callbacks so if they don't return something which is int-like, we assume they mean to return 0. - Add nbd.Buffer free() method. Read commit message in patch 2 to see what this is about. - Fixed the asynch copy test to deal with the unbelievably
2019 Aug 13
1
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On Mon, Aug 12, 2019 at 11:00:01PM +0100, Richard W.M. Jones wrote: > On Mon, Aug 12, 2019 at 01:53:56PM -0500, Eric Blake wrote: > > We then have the design question of whether to make an OClosure type, > > where C has two functions nbd_aio_pread and nbd_aio_pread_callback for > > convenience, but where other languages have only a single nbd.aio_pread > > where the
2019 Aug 12
0
[PATCH libnbd 7/7] api: Remove the valid_flag from all callbacks.
The freeing feature can now be done by associating a free callback with a closure's user_data, so having the valid_flag is no longer necessary and it can be completely removed. This mostly reverts commit 2d9b98e96772e282d51dafac07f16387dadc8afa. --- TODO | 2 - docs/libnbd.pod | 64 ++-------------- examples/glib-main-loop.c |
2019 Aug 26
2
Re: [PATCH disk-sync 5/5] Convert disk_sync inner loop to asynchronous.
On Thu, Aug 22, 2019 at 03:39:35PM +0100, Richard W.M. Jones wrote: >Previously the inner loop would issue nbd.pread() requests >synchronously, meaning that we would issue a request for each data >block from the nbdkit server (which would in turn synchronously >request the data from VMware) and wait until nbdkit replies before >continuing. > >This converts the inner loop so it
2019 Aug 10
7
[PATCH libnbd 0/5] WIP: python: Add test for doing asynch copy.
This doesn't yet work. However it does make me more convinced than ever that we really need to sort out persistent buffer lifetimes in the library (similar to what we did for closures). Rich.
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2019 Aug 22
7
[PATCH disk-sync 0/5] Misc cleanups and convert inner loop to asynch.
This is based on top of: https://github.com/nertpinx/v2v-conversion-host/commit/0bb2efdcacd975a2cae7380080991ac7fc238d2b The first 4 patches are fairly uncontroversial miscellaneous cleanups. Patch 5 is the interesting one. (Note it doesn't quite work yet, so it's for discussion only.) Patch 5 converts the inner loop to use asynchronous libnbd calls. performance improves quite a bit for
2019 Aug 13
1
Re: [PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
On 8/13/19 10:37 AM, Richard W.M. Jones wrote: > The original nbd_aio_* (non-callback) functions are removed and > replaced with the renamed callback variants. > > This is a simple mechanical change to the API: > > (1) Any existing call to nbd_aio_*_callback can simply be renamed to > nbd_aio_* > > (2) Any existing call to nbd_aio_* must have two extra NULL
2019 May 28
6
[RFC libnbd PATCH 0/4] Add CMD_FLAG_DF support
RFC because this is an API break, but we haven't declared stable API yet. If we like it, I'm working on using libnbd to implement the nbdkit-nbd plugin; knowing whether it is API version 0.1 or 0.2 will be useful. I also dabbled with allowing optional parameters in python, although my OCaml is weak enough that there may be cleaner ways to approach that. Eric Blake (4): api: Add flags
2019 Jul 25
2
[PATCH libnbd] lib: Kill subprocess in nbd_close.
This is a simple patch which stops nbd_close from waiting too long for a server subprocess to shut down. I wanted to send SIGHUP because the server will be able to catch it and do a clean shutdown if that is required. Is another signal better? Is it right to send a signal here? Rich.
2019 Aug 14
4
[PATCH libnbd 0/2] Use free callback to dereference NBD.Buffer.
In this patch series we use the newly introduced free callback on the completion function to dererence the OCaml NBD.Buffer. I will make the same kind of change for Python later in a separate series. The completion function is always called at the C level, even if the OCaml program didn't use the optional argument. That's because the free callback doesn't run otherwise. There is a
2019 Aug 12
0
[PATCH libnbd 5/7] ocaml: Use free callback to free closure root, instead of valid_flag == FREE.
Instead of using the valid_flag == FREE mechanism, use a free callback to free each closure root. --- generator/generator | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generator/generator b/generator/generator index 92ce170..109fad6 100755 --- a/generator/generator +++ b/generator/generator @@ -5239,9 +5239,6 @@ let print_ocaml_binding (name, { args; optargs; ret })
2019 Aug 12
0
[PATCH libnbd 6/7] python: Use free callback to free closure root.
Same as the previous commit, but for Python. --- generator/generator | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/generator/generator b/generator/generator index 109fad6..a0322ee 100755 --- a/generator/generator +++ b/generator/generator @@ -4315,9 +4315,6 @@ let print_python_binding name { args; optargs; ret; may_set_error } = ) cbargs; pr