search for: aio_pwrite_callback

Displaying 20 results from an estimated 22 matches for "aio_pwrite_callback".

2019 Aug 13
0
[PATCH libnbd 6/6] lib: Make all completion callbacks into OClosures.
...losure ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = "read from the NBD server, with callback on completion"; @@ -1910,9 +1908,8 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with - args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistIn ("buf", "count"); UInt...
2019 Aug 13
0
[PATCH libnbd v2 2/3] lib: Make all completion callbacks into OClosures.
...losure ]; + optargs = [ OClosure completion_closure; OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; shortdesc = "read from the NBD server, with callback on completion"; @@ -1910,9 +1908,8 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with - args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure completion_closure ]; - optargs = [ OFlags ("flags", cmd_flags) ]; + args = [ BytesPersistIn ("buf", "count"); UInt...
2019 Aug 13
7
[PATCH libnbd v2 0/3] Implement OClosures.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-August/msg00168.html I pushed uncontroversial patches 1-4 v2: - The implementation of OClosure (new patch 1) in Python is fixed. - Patch 2 (old patch 5) is unchanged. - I added a new API for removing debug callbacks. I think this approach has some advantages over using OClosure. - I didn't yet do any work on changing the
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring and IMHO we should just push them. Possibly 1-3 should be squashed together, but I posted them separately so they are easier to review. Patches 5 and 6 together implement OClosure. Patch 5 adds the feature and is simple to understand. Patch 6 changes the Closure completion callbacks into OClosure, but because it doesn't
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 13
0
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...finished_read, &buffers[i], 0) == -1) { fprintf (stderr, "%s\n", nbd_get_error ()); exit (EXIT_FAILURE); } @@ -426,9 +426,9 @@ write_data (gpointer user_data) assert (buffer->state == BUFFER_READ_COMPLETED); buffer->state = BUFFER_WRITING; - if (nbd_aio_pwrite_callback (gsdest->nbd, buffer->data, - BUFFER_SIZE, buffer->offset, - finished_write, buffer, 0) == -1) { + if (nbd_aio_pwrite (gsdest->nbd, buffer->data, + BUFFER_SIZE, buffer->offset, +...
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...gs=[CBMutable (Int "error")] } ]; + Closure chunk_closure; + Closure completion_closure ]; optargs = [ OFlags ("flags", cmd_flags) ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1904,8 +1910,7 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure { cbname="completion"; - cbargs=[CBMutable (Int "error")] } ]; + Closure completion_closure ];...
2019 Aug 13
1
Re: [PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...t ~completion starts just after the ( above) > soff := !soff +^ bs > ); > @@ -59,7 +59,7 @@ let asynch_copy src dst = > List.iter ( > fun (buf, offset) -> > (* Note the size of the write is implicitly stored in buf. *) > - ignore (NBD.aio_pwrite_callback dst buf offset > + ignore (NBD.aio_pwrite dst buf offset > ~completion:(write_completed buf)) and here > +++ b/ocaml/tests/test_590_aio_copy.ml > @@ -71,7 +71,7 @@ let asynch_copy src dst = > if !soff < size && NBD.aio_in_flight src < m...
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 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...] }; - Closure { cbname="callback"; + Closure { cbname="completion"; cbargs=[Mutable (Int "error")] }; Flags "flags" ]; ret = RInt64; @@ -1814,7 +1814,7 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure { cbname="callback"; + Closure { cbname="completion"; cbargs=[Mutable (Int "error")]...
2019 Jul 16
2
[PATCH libnbd] generator: Define new Closure type
** INCOMPLETE ** This is the generator change as discussed on the list already. The Python and OCaml bindings are not yet done. It passes all [C only] tests and valgrind. Note that nbd_add_close_callback is inconsistent with other closure types because it passes the user_data parameter after the function. (This is not caused by the current patch, it was already inconsistent). We decided that
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 Jul 16
0
[libnbd PATCH 2/2] RFC: generator: Handle shared callbacks in Python
...cbargs=[ Int64 "cookie"; + Mutable (Int "error") ]}]); Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1819,9 +1832,10 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Opaque "data"; - CallbackPersist ("callback", [ Opaque "data"; Int64 "cookie"; -...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...allback"; + cbargs=[Int64 "cookie"; + Mutable (Int "error"); ]}; Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1829,9 +1819,8 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure (true, - { cbname="callback"; - cbargs=[Int64 "cookie"; Mutable (Int "error")...
2019 Jul 16
3
[RFC libnbd PATCH 0/2] Start fixing python nbd.pread_structured_callback
Posting now that I got something to compile (at the expense of breaking OCaml bindings), but I'm open to ideas on how to improve it. Eric Blake (2): generator: Tweak print_c_arg_list to take alternate first arg RFC: generator: Handle shared callbacks in Python generator/generator | 556 ++++++++++++++++++++++---------------------- 1 file changed, 280 insertions(+), 276 deletions(-) --
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...allback"; + cbargs=[Int64 "cookie"; + Mutable (Int "error"); ]}; Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1829,9 +1819,8 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure (true, - { cbname="callback"; - cbargs=[Int64 "cookie"; Mutable (Int "error")...
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...allback"; + cbargs=[Int64 "cookie"; + Mutable (Int "error"); ]}; Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1807,9 +1797,8 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Closure (true, - { cbname="callback"; - cbargs=[Int64 "cookie"; Mutable (Int "error")...
2019 Jul 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
..."; + cbargs=[Int64 "cookie"; + Mutable (Int "error"); ]} ]); Flags "flags" ]; ret = RInt64; permitted_states = [ Connected ]; @@ -1819,9 +1827,9 @@ C<nbd_pwrite>."; "aio_pwrite_callback", { default_call with args = [ BytesPersistIn ("buf", "count"); UInt64 "offset"; - Opaque "data"; - CallbackPersist ("callback", [ Opaque "data"; Int64 "cookie"; -...
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 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD. Rich.