Displaying 10 results from an estimated 10 matches for "aio_buffer".
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
...ndex 26ab365..0107724 100755
--- a/generator/generator
+++ b/generator/generator
@@ -3981,8 +3981,10 @@ raise_exception ()
pr "extern PyObject *nbd_internal_py_%s (PyObject *self, PyObject *args);\n"
name;
) ([ "create"; "close";
- "alloc_aio_buffer"; "aio_buffer_from_bytearray";
- "aio_buffer_to_bytearray" ] @ List.map fst handle_calls);
+ "alloc_aio_buffer";
+ "aio_buffer_from_bytearray";
+ "aio_buffer_to_bytearray";
+ "aio_buffer_size" ] @ List.ma...
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 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 Jul 25
0
[PATCH libnbd] lib: Kill subprocess in nbd_close.
$ time nbdsh -c 'h.connect_command (["nbdkit", "-s", "null", "size=512", "--filter=delay", "delay-read=10"]); b = nbd.aio_buffer(1); h.aio_pread (b, 0); del (h)'
real 0m10.499s
user 0m0.065s
sys 0m0.023s
With this patch the elapsed time is near instantaneous.
---
lib/handle.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/handle.c b/lib/handle.c
index 1fe4467..111cfc5 100644
--- a/lib/handle...
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...ck _
+ | BytesPersistIn _ | BytesPersistOut _ | Callback _ | Flags _
| Int _ | Int64 _ | Path _ | SockAddrAndLen _ | StringList _
| UInt _ | UInt32 _ -> ()
) args;
@@ -3054,6 +3072,9 @@ let print_python_binding name { args; ret } =
pr " struct py_aio_buffer *%s_buf;\n" n
| Callback (n, _) ->
pr " struct %s_%s_data callback_data;\n" name n
+ | Flags n ->
+ pr " uint32_t %s_u32;\n" n;
+ pr " unsigned int %s = 0; /* really uint32_t */\n" n
| Int n -> pr " int %s;\n"...
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.
2020 Mar 24
1
[PATCH libnbd v3] Add Go language bindings (golang) (RHBZ#1814538).
This feature is roughly finished now, although it needs a few more
tests and some examples.
It's pretty much up to par with all the other bindings, but it lacks a
completely safe AIO buffer. It won't stop you from freeing the buffer
too early) because golang's GC inexplicably lacks a way to declare a
root from C. I can probably do it with a global variable and ref
counting on the
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
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test.
File descriptors are passed in and out as plain ints (instead of
*os.File) for a couple of reasons: (1) We have to pass the plain int
to syscall.Select. (2) Turning an fd into an os.File causes golang to
set the blocking flag which is deeply unhelpful.
Rich.
2019 Jul 25
1
Re: [PATCH libnbd] lib: Kill subprocess in nbd_close.
On 7/25/19 12:43 PM, Richard W.M. Jones wrote:
> $ time nbdsh -c 'h.connect_command (["nbdkit", "-s", "null", "size=512", "--filter=delay", "delay-read=10"]); b = nbd.aio_buffer(1); h.aio_pread (b, 0); del (h)'
> real 0m10.499s
> user 0m0.065s
> sys 0m0.023s
>
> With this patch the elapsed time is near instantaneous.
> ---
> lib/handle.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/handle.c b/lib/handl...