search for: subbuf

Displaying 20 results from an estimated 31 matches for "subbuf".

2019 Jun 21
0
[libnbd PATCH v2 3/5] states: Add nbd_pread_structured API
...l extensions)."; + }; + + "pread_structured", { + default_call with + args = [ BytesOut ("buf", "count"); UInt64 "offset"; + Opaque "data"; + Callback ("chunk", [ Opaque "data"; BytesIn ("subbuf", "count"); + UInt64 "offset"; Int "error"; + Int "status" ]); + Flags "flags" ]; + ret = RErr; + permitted_states = [ Connected ]; + shortdesc = "read...
2019 Jun 25
1
[libnbd PATCH] pread_structured: Change callback type to use Mutable error
.../generator +++ b/generator/generator @@ -1330,7 +1330,7 @@ protocol extensions)."; args = [ BytesOut ("buf", "count"); UInt64 "offset"; Opaque "data"; Callback ("chunk", [ Opaque "data"; BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "error"; + UInt64 "offset"; Mutable (Int "error"); Int "status" ]); Flags "flag...
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...rator @@ -916,6 +916,32 @@ let non_blocking_test_call_description = "\n This call does not block, because it returns data that is saved in the handle from the NBD protocol handshake." +(* Closures. *) +let chunk_closure = { + cbname = "chunk"; + cbargs = [ CBBytesIn ("subbuf", "count"); + CBUInt64 "offset"; CBUInt "status"; + CBMutable (Int "error") ] +} +let completion_closure = { + cbname = "completion"; + cbargs = [ CBMutable (Int "error") ] +} +let debug_closure = { + cbname...
2019 Jul 24
0
[PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.
...e8d6 100755 --- a/generator/generator +++ b/generator/generator @@ -1348,7 +1348,7 @@ protocol extensions)."; args = [ BytesOut ("buf", "count"); UInt64 "offset"; Closure { cbname="chunk"; cbargs=[BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "status"; + UInt64 "offset"; UInt "status"; Mutable (Int "error")] }; Flags "flags"...
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 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 Aug 09
0
[PATCH libnbd 1/2] generator: Handle closure args (cbargs) specially.
...callback"; longdesc = "\ @@ -1398,9 +1405,9 @@ protocol extensions)."; default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; Closure { cbname="chunk"; - cbargs=[BytesIn ("subbuf", "count"); - UInt64 "offset"; UInt "status"; - Mutable (Int "error")] }; + cbargs=[CBBytesIn ("subbuf", "count"); + CBUIn...
2019 Jul 16
0
[libnbd PATCH 2/2] RFC: generator: Handle shared callbacks in Python
...protocol extensions)."; "pread_structured", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; - Opaque "data"; - Callback ("chunk", [ Opaque "data"; BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "status"; - Mutable (Int "error"); ]); + OpaqueAndCallbacks ("data", + [ {name="chunk"; +...
2019 Jun 21
9
[libnbd PATCH v2 0/5] nbd_pread_structured
Since v1: - rebase to applied patches - split out support for Int in callbacks - sort of test that callbacks work in OCaml (see comment in patch 5) - rename API to nbd_pread_structured - expose error as explicit parameter to callback Eric Blake (5): generator: Allow Int in callbacks states: Wire in a read callback states: Add nbd_pread_structured API states: Add tests for
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...ocol extensions)."; "pread_structured", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; - Closure (false, - { cbname="chunk"; - cbargs=[BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "status"; - Mutable (Int "error")] }); + Closure { cbname="chunk"; + cbargs=[BytesIn ("subbuf", "c...
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
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...ocol extensions)."; "pread_structured", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; - Closure (false, - { cbname="chunk"; - cbargs=[BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "status"; - Mutable (Int "error")] }); + Closure { cbname="chunk"; + cbargs=[BytesIn ("subbuf", "c...
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
...ot;\ @@ -1351,10 +1351,10 @@ protocol extensions)."; default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; Closure (false, - [{ cbname="chunk"; - cbargs=[BytesIn ("subbuf", "count"); - UInt64 "offset"; Int "status"; - Mutable (Int "error")] }]); + { cbname="chunk"; + cbargs=[BytesIn ("subbuf", &q...
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.
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 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...protocol extensions)."; "pread_structured", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; - Opaque "data"; - Callback ("chunk", [ Opaque "data"; BytesIn ("subbuf", "count"); + Closure (false, + [{ cbname="chunk"; + cbargs=[ BytesIn ("subbuf", "count"); UInt64 "offset"; Int "status"; -...
2019 Aug 09
4
[PATCH libnbd 0/2] generator: Preparatory changes to the generator.
These are some simplifications to the generator. They don't probably make much sense on their own, but they are preparatory to better handling of enums, and or'd lists of flags. Rich.
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 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...", { default_call with args = [ BytesOut ("buf", "count"); UInt64 "offset"; - Closure (false, - { cbname="chunk"; + Closure { cbname="chunk"; cbargs=[BytesIn ("subbuf", "count"); UInt64 "offset"; UInt "status"; - Mutable (Int "error")] }); + Mutable (Int "error")] }; Flags "flags" ]; re...
2019 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...ot;; > "pread_structured", { > default_call with > args = [ BytesOut ("buf", "count"); UInt64 "offset"; > - Opaque "data"; > - Callback ("chunk", [ Opaque "data"; BytesIn ("subbuf", "count"); > + Closure (false, > + [{ cbname="chunk"; > + cbargs=[ BytesIn ("subbuf", "count"); a second here (list start is same, cbargs now has a space after [) >...