search for: nbd_internal_py_alloc_aio_buff

Displaying 3 results from an estimated 3 matches for "nbd_internal_py_alloc_aio_buff".

2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
...py_aio_buffer * nbd_internal_py_get_aio_buffer (PyObject *capsule) @@ -89,9 +89,7 @@ free_aio_buffer (PyObject *capsule) free (buf); } -/* Allocate a persistent buffer used for nbd_aio_pread and - * nbd_aio_pwrite. - */ +/* Allocate a persistent buffer used for nbd_aio_pread. */ PyObject * nbd_internal_py_alloc_aio_buffer (PyObject *self, PyObject *args) { @@ -115,7 +113,7 @@ nbd_internal_py_alloc_aio_buffer (PyObject *self, PyObject *args) free (buf); return NULL; } - buf->data = calloc (1, buf->len); + buf->data = malloc (buf->len); if (buf->data == NULL) { PyErr_NoMemory (...
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