search for: from_bytearray

Displaying 6 results from an estimated 6 matches for "from_bytearray".

2020 Jan 30
2
[PATCH libnbd] python: Add AIO buffer is_zero method.
...16); + + return true; +} + +#endif /* NBDKIT_ISZERO_H */ diff --git a/generator/generator b/generator/generator index 31fe9dd..20fd872 100755 --- a/generator/generator +++ b/generator/generator @@ -5014,7 +5014,8 @@ raise_exception () "alloc_aio_buffer"; "aio_buffer_from_bytearray"; "aio_buffer_to_bytearray"; - "aio_buffer_size" ] @ List.map fst handle_calls); + "aio_buffer_size"; + "aio_buffer_is_zero" ] @ List.map fst handle_calls); pr "\n"; pr "#endif /* LIBNBD_METHODS_H */\n&quo...
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
...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.map fst handle_calls); pr "\n&q...
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 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
0
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...-pwrite.py index 71aa9ba..ded1d10 100644 --- a/python/t/510-aio-pwrite.py +++ b/python/t/510-aio-pwrite.py @@ -34,7 +34,7 @@ h.connect_command (["nbdkit", "-s", "--exit-with-parent", "-v", "file", datafile]) buf1 = nbd.Buffer.from_bytearray (buf) -cookie = h.aio_pwrite (buf1, 0, nbd.CMD_FLAG_FUA) +cookie = h.aio_pwrite (buf1, 0, flags=nbd.CMD_FLAG_FUA) while not (h.aio_command_completed (cookie)): h.poll (-1) diff --git a/tests/aio-parallel-load.c b/tests/aio-parallel-load.c index 614c22b..1f48324 100644 --- a/tests/aio-parall...
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.