Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/4] vmdk: Implement .bdrv_co_create callback

2018-12-06 Thread Markus Armbruster
This is a reasonably careful review of the QAPI-related parts, but more of an eye-over for the remainder. Kevin Wolf writes: > From: Fam Zheng > > This makes VMDK support blockdev-create. The implementation reuses the > image creation code in vmdk_co_create_opts which now acceptes a callback >

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/4] vmdk: Refactor vmdk_create_extent

2018-12-06 Thread Markus Armbruster
Kevin Wolf writes: > From: Fam Zheng > > The extracted vmdk_init_extent takes a BlockBackend object and > initializes the format metadata. It is the common part between "qemu-img > create" and "blockdev-create". > > Add a "BlockBackend *pbb" parameter to vmdk_create_extent, to return the >

Re: [Qemu-block] [PATCH] qemu: avoid memory leak while remove disk

2018-12-06 Thread Michael S. Tsirkin
On Fri, Dec 07, 2018 at 09:53:06AM +0800, wangjian wrote: > Memset vhost_dev to zero in the vhost_dev_cleanup function. > This causes dev.vqs to be NULL, so that > vqs does not free up space when calling the g_free function. > This will result in a memory leak. But you can't release vqs > directly

[Qemu-block] [PATCH] qemu: avoid memory leak while remove disk

2018-12-06 Thread wangjian
Memset vhost_dev to zero in the vhost_dev_cleanup function. This causes dev.vqs to be NULL, so that vqs does not free up space when calling the g_free function. This will result in a memory leak. But you can't release vqs directly in the vhost_dev_cleanup function, because vhost_net will also

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] bitmaps: remove x- prefix from QMP api

2018-12-06 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181206192544.3987-1-js...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH 0/3] bitmaps: remove x- prefix from QMP api Message-id:

Re: [Qemu-block] [PATCH 1/3] blockdev: abort transactions in reverse order

2018-12-06 Thread John Snow
On 12/6/18 3:37 PM, Eric Blake wrote: > On 12/6/18 1:25 PM, John Snow wrote: >> Presently, we abort transactions in the same order they were processed >> in. >> Bitmap commands, though, attempt to restore backup data structures on >> abort. >> To that end, though, they need to be aborted in

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] bitmaps: remove x- prefix from QMP api

2018-12-06 Thread John Snow
On 12/6/18 2:25 PM, John Snow wrote: > Touch up a few last things and remove the x- prefix. > > Test on the way, thoughts? > > John Snow (3): > blockdev: abort transactions in reverse order > blockdev: n-ary bitmap merge > block: remove 'x' prefix from experimental bitmap APIs > >

Re: [Qemu-block] [PATCH 1/3] blockdev: abort transactions in reverse order

2018-12-06 Thread Eric Blake
On 12/6/18 1:25 PM, John Snow wrote: Presently, we abort transactions in the same order they were processed in. Bitmap commands, though, attempt to restore backup data structures on abort. To that end, though, they need to be aborted in reverse chronological order. Replace the QSIMPLEQ data

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/4] vmdk: Implement blockdev-create

2018-12-06 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181206151304.8388-1-kw...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v3 0/4] vmdk: Implement blockdev-create Message-id:

[Qemu-block] [PATCH 0/3] bitmaps: remove x- prefix from QMP api

2018-12-06 Thread John Snow
Touch up a few last things and remove the x- prefix. Test on the way, thoughts? John Snow (3): blockdev: abort transactions in reverse order blockdev: n-ary bitmap merge block: remove 'x' prefix from experimental bitmap APIs blockdev.c | 96

[Qemu-block] [PATCH 3/3] block: remove 'x' prefix from experimental bitmap APIs

2018-12-06 Thread John Snow
The 'x' prefix was added because we were uncertain of the direction we'd take for the libvirt API. With the general approach solidified, I feel comfortable committing to this API for 4.0. Signed-off-by: John Snow --- blockdev.c | 22 +++--- qapi/block-core.json |

[Qemu-block] [PATCH 1/3] blockdev: abort transactions in reverse order

2018-12-06 Thread John Snow
Presently, we abort transactions in the same order they were processed in. Bitmap commands, though, attempt to restore backup data structures on abort. To that end, though, they need to be aborted in reverse chronological order. Replace the QSIMPLEQ data structure with a QTAILQ one, so we can

[Qemu-block] [PATCH 2/3] blockdev: n-ary bitmap merge

2018-12-06 Thread John Snow
Especially outside of transactions, it is helpful to provide all-or-nothing semantics for bitmap merges. This facilitates the coalescing of multiple bitmaps into a single target for the "checkpoint" interpretation when assembling bitmaps that represent arbitrary points in time from component

Re: [Qemu-block] [PATCH v2 5/5] crypto: support multiple threads accessing one QCryptoBlock

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
06.12.2018 13:54, Daniel P. Berrangé wrote: > On Wed, Dec 05, 2018 at 05:47:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> The two thing that should be handled are cipher and ivgen. For ivgen >> the solution is just mutex, as iv calculations should not be long in >> comparison with

Re: [Qemu-block] [PATCH v2 2/5] crypto/block: refactor qcrypto_block_*crypt_helper functions

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
06.12.2018 13:36, Daniel P. Berrangé wrote: > On Wed, Dec 05, 2018 at 05:46:57PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> qcrypto_block_encrypt_helper and qcrypto_block_decrypt_helper are >> almost identical, let's reduce code duplication and simplify further >> improvements. >> >>

Re: [Qemu-block] [PATCH 10/14] nbd/client: Split handshake into two functions

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
06.12.2018 18:16, Vladimir Sementsov-Ogievskiy wrote: > 01.12.2018 1:03, Eric Blake wrote: >> + * Returns: negative errno: failure talking to server >> + *  0: server is oldstyle, client must still parse export size >> + *  1: server is newstyle, but can only accept EXPORT_NAME >>

Re: [Qemu-block] [PATCH 08/14] nbd/client: Refactor nbd_receive_list()

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
06.12.2018 19:31, Eric Blake wrote: > On 12/6/18 8:18 AM, Vladimir Sementsov-Ogievskiy wrote: >> 01.12.2018 1:03, Eric Blake wrote: >>> Add some parameters to make this function reusable in upcoming >>> export listing, where we will want to capture the name and >>> description rather than compare

Re: [Qemu-block] [PATCH v3] qemu-img info lists bitmap directory entries

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
06.12.2018 16:19, Andrey Shinkevich wrote: > The 'Format specific information' of qemu-img info command will show > the name, flags and granularity for every QCOW2 bitmap as follows: > > image: /vz/vmprivate/VM1/harddisk.hdd > file format: qcow2 > virtual size: 64G (68719476736 bytes) > disk

Re: [Qemu-block] [PATCH 08/14] nbd/client: Refactor nbd_receive_list()

2018-12-06 Thread Eric Blake
On 12/6/18 8:18 AM, Vladimir Sementsov-Ogievskiy wrote: 01.12.2018 1:03, Eric Blake wrote: Add some parameters to make this function reusable in upcoming export listing, where we will want to capture the name and description rather than compare against a user-supplied name. No change in

Re: [Qemu-block] [PATCH 07/14] nbd/client: Refactor nbd_negotiate_simple_meta_context()

2018-12-06 Thread Eric Blake
On 12/6/18 7:20 AM, Vladimir Sementsov-Ogievskiy wrote: 01.12.2018 1:03, Eric Blake wrote: Change the signature to make it easier for a future patch to reuse this function for calling NBD_OPT_LIST_META_CONTEXT with 0 or 1 queries. Also, always allocate space for the received name, even if it

Re: [Qemu-block] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 06 December 2018 15:24 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini > Subject: Re: [PATCH 15/18] xen: add a mechanism to

[Qemu-block] [PATCH v2 11/18] xen: remove 'XenBlkDev' and 'blkdev' names from dataplane/xen-block

2018-12-06 Thread Paul Durrant
This is a purely cosmetic patch that substitutes the old 'struct XenBlkDev' name with 'XenBlockDataPlane' and 'blkdev' field/variable names with 'dataplane', and then does necessary fix-up to adhere to coding style. No functional change. Signed-off-by: Paul Durrant Acked-by: Anthony Perard ---

[Qemu-block] [PATCH v2 10/18] xen: add header and build dataplane/xen-block.c

2018-12-06 Thread Paul Durrant
This patch adds the transformations necessary to get dataplane/xen-block.c to build against the new XenBus/XenDevice framework. MAINTAINERS is also updated due to the introduction of dataplane/xen-block.h. NOTE: Existing data structure names are retained for the moment. These will be

[Qemu-block] [PATCH v2 12/18] xen: remove 'ioreq' struct/varable/field names from dataplane/xen-block.c

2018-12-06 Thread Paul Durrant
This is a purely cosmetic patch that purges the name 'ioreq' from struct, variable and field names. (This name has been problematic for a long time as 'ioreq' is the name used for generic I/O requests coming from Xen). The patch replaces 'struct ioreq' with a new 'XenBlockRequest' type and 'ioreq'

[Qemu-block] [PATCH v2 17/18] MAINTAINERS: add myself as a Xen maintainer

2018-12-06 Thread Paul Durrant
I have made many significant contributions to the Xen code in QEMU, particularly the recent patches introducing a new PV device framework. I intend to make further significant contributions, porting other PV back- ends to the new framework with the intent of eventually removing the legacy code. It

[Qemu-block] [PATCH v2 13/18] xen: purge 'blk' and 'ioreq' from function names in dataplane/xen-block.c

2018-12-06 Thread Paul Durrant
This is a purely cosmetic patch that purges remaining use of 'blk' and 'ioreq' in local function names, and then makes sure all functions are prefixed with 'xen_block_'. No functional change. Signed-off-by: Paul Durrant --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Stefan Hajnoczi Cc:

[Qemu-block] [PATCH v2 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Paul Durrant
...that maintains compatibility with existing Xen toolstacks. Xen toolstacks instantiate PV backends by simply writing information into xenstore and expecting a backend implementation to be watching for this. This patch adds a new 'xen-backend' module to allow individual XenDevice

[Qemu-block] [PATCH v2 16/18] xen: automatically create XenBlockDevice-s

2018-12-06 Thread Paul Durrant
This patch adds a creator function for XenBlockDevice-s so that they can be created automatically when the Xen toolstack instantiates a new PV backend. When the XenBlockDevice is created this way it is also necessary to create a drive which matches the configuration that the Xen toolstack has

[Qemu-block] [PATCH v2 18/18] xen: remove the legacy 'xen_disk' backend

2018-12-06 Thread Paul Durrant
This backend has now been replaced by the 'xen-qdisk' XenDevice. Signed-off-by: Paul Durrant --- Cc: Kevin Wolf Cc: Max Reitz Cc: Anthony Perard Cc: Stefano Stabellini --- hw/block/Makefile.objs |1 - hw/block/xen_disk.c| 1011 2

[Qemu-block] [PATCH v2 14/18] xen: add implementations of xen-block connect and disconnect functions...

2018-12-06 Thread Paul Durrant
...and wire in the dataplane. This patch adds the remaining code to make the xen-block XenDevice functional. The parameters that a block frontend expects to find are populated in the backend xenstore area, and the 'ring-ref' and 'event-channel' values specified in the frontend xenstore area are

[Qemu-block] [PATCH v2 07/18] xen: add event channel interface for XenDevice-s

2018-12-06 Thread Paul Durrant
The legacy PV backend infrastructure provides functions to bind, unbind and send notifications to event channnels. Similar functionality will be required by XenDevice implementations so this patch adds the necessary support. Signed-off-by: Paul Durrant --- Cc: Stefano Stabellini Cc: Anthony

[Qemu-block] [PATCH v2 06/18] xen: add grant table interface for XenDevice-s

2018-12-06 Thread Paul Durrant
The legacy PV backend infrastructure provides functions to map, unmap and copy pages granted by frontends. Similar functionality will be required by XenDevice implementations so this patch adds the necessary support. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc: Stefano

[Qemu-block] [PATCH v2 01/18] xen: re-name XenDevice to XenLegacyDevice...

2018-12-06 Thread Paul Durrant
...and xen_backend.h to xen-legacy-backend.h Rather than attempting to convert the existing backend infrastructure to be QOM compliant (which would be hard to do in an incremental fashion), subsequent patches will introduce a completely new framework for Xen PV backends. Hence it is necessary to

[Qemu-block] [PATCH v2 04/18] xen: create xenstore areas for XenDevice-s

2018-12-06 Thread Paul Durrant
This patch adds a new source module, xen-bus-helper.c, which builds on basic libxenstore primitives to provide functions to create (setting permissions appropriately) and destroy xenstore areas, and functions to 'printf' and 'scanf' nodes therein. The main xen-bus code then uses these primitives

[Qemu-block] [PATCH v2 00/18] Xen PV backend 'qdevification'

2018-12-06 Thread Paul Durrant
This series introduces a new QOM compliant framework for Xen PV backends. This is achieved by first moving the current non-compliant framework aside, before building up a new framework incrementally. This series was prompted by a thread [1] started by Kevin Wolf in response to patches against

[Qemu-block] [PATCH v2 05/18] xen: add xenstore watcher infrastructure

2018-12-06 Thread Paul Durrant
A Xen PV frontend communicates its state to the PV backend by writing to the 'state' key in the frontend area in xenstore. It is therefore necessary for a XenDevice implementation to be notified whenever the value of this key changes. This patch adds code to do this as follows: - an 'fd handler'

[Qemu-block] [PATCH v2 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy

2018-12-06 Thread Paul Durrant
This patch adds the basic boilerplate for a 'XenBus' object that will act as a parent to 'XenDevice' PV backends. A new 'XenBridge' object is also added to connect XenBus to the system bus. The XenBus object is instantiated by a new xen_bus_init() function called from the same sites as the legacy

[Qemu-block] [PATCH v3 1/4] vmdk: Refactor vmdk_create_extent

2018-12-06 Thread Kevin Wolf
From: Fam Zheng The extracted vmdk_init_extent takes a BlockBackend object and initializes the format metadata. It is the common part between "qemu-img create" and "blockdev-create". Add a "BlockBackend *pbb" parameter to vmdk_create_extent, to return the opened BB to the caller in the next

[Qemu-block] [PATCH v3 3/4] iotests: Filter cid numbers in VMDK extent info

2018-12-06 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.filter | 1 + tests/qemu-iotests/iotests.py| 1 + 2 files changed, 2 insertions(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index

[Qemu-block] [PATCH v3 2/4] vmdk: Implement .bdrv_co_create callback

2018-12-06 Thread Kevin Wolf
From: Fam Zheng This makes VMDK support blockdev-create. The implementation reuses the image creation code in vmdk_co_create_opts which now acceptes a callback pointer to "retrieve" BlockBackend pointers from the caller. This way we separate the logic between file/extent acquisition and

[Qemu-block] [PATCH v2 03/18] xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom'

2018-12-06 Thread Paul Durrant
This patch adds new XenDevice-s: 'xen-disk' and 'xen-cdrom', both derived from a common 'xen-block' parent type. These will eventually replace the 'xen_disk' (note the underscore rather than hyphen) legacy PV backend but it is illustrative to build up the implementation incrementally, along with

[Qemu-block] [PATCH v2 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2018-12-06 Thread Paul Durrant
Not all of the code duplicated from xen_disk.c is required as the basis for the new dataplane implementation so this patch removes extraneous code, along with the legacy #includes and calls to the legacy xen_pv_printf() function. Error messages are changed to be reported using error_report().

[Qemu-block] [PATCH v2 08/18] xen: duplicate xen_disk.c as basis of dataplane/xen-block.c

2018-12-06 Thread Paul Durrant
The new xen-block XenDevice implementation requires the same core dataplane as the legacy xen_disk implementation it will eventually replace. This patch therefore copies the legacy xen_disk.c source module into a new dataplane/xen-block.c source module as the basis for the new dataplane and

[Qemu-block] [PATCH v3 4/4] iotests: Add VMDK tests for blockdev-create

2018-12-06 Thread Kevin Wolf
Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- tests/qemu-iotests/237 | 201 tests/qemu-iotests/237.out | 309 + tests/qemu-iotests/group | 1 + 3 files changed, 511 insertions(+) create mode 100755

[Qemu-block] [PATCH v3 0/4] vmdk: Implement blockdev-create

2018-12-06 Thread Kevin Wolf
I picked up the patch series from Fam and rebased it to current master (which involved a major rework on the test case) and tried to address Markus' review comments for v2. I did not do any further review of the actual code, but it passes the tests, so I guess having it in tree is better than

Re: [Qemu-block] [PATCH 10/14] nbd/client: Split handshake into two functions

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
01.12.2018 1:03, Eric Blake wrote: > An upcoming patch will add the ability for qemu-nbd to list > the services provided by an NBD server. Share the common > code of the TLS handshake by splitting the initial exchange > into a separate function, leaving only the export handling > in the original

Re: [Qemu-block] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Anthony PERARD
On Thu, Dec 06, 2018 at 12:36:52PM +, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 04 December 2018 15:35 > > > > On Wed, Nov 21, 2018 at 03:12:08PM +, Paul Durrant wrote: > > > +xenbus->backend_watch = > > >

Re: [Qemu-block] [PATCH 09/14] nbd/client: Refactor return of nbd_receive_negotiate()

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
01.12.2018 1:03, Eric Blake wrote: > The function could only ever return 0 or -EINVAL; make this > clearer by dropping a useless 'fail:' label. > > Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > nbd/client.c | 51

Re: [Qemu-block] [PATCH 08/14] nbd/client: Refactor nbd_receive_list()

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
01.12.2018 1:03, Eric Blake wrote: > Add some parameters to make this function reusable in upcoming > export listing, where we will want to capture the name and > description rather than compare against a user-supplied name. > No change in semantics to the existing caller. > > Signed-off-by: Eric

[Qemu-block] [PATCH v3] qemu-img info lists bitmap directory entries

2018-12-06 Thread Andrey Shinkevich
The 'Format specific information' of qemu-img info command will show the name, flags and granularity for every QCOW2 bitmap as follows: image: /vz/vmprivate/VM1/harddisk.hdd file format: qcow2 virtual size: 64G (68719476736 bytes) disk size: 3.0M cluster_size: 1048576 Format specific information:

Re: [Qemu-block] [PATCH 07/14] nbd/client: Refactor nbd_negotiate_simple_meta_context()

2018-12-06 Thread Vladimir Sementsov-Ogievskiy
01.12.2018 1:03, Eric Blake wrote: > Change the signature to make it easier for a future patch to > reuse this function for calling NBD_OPT_LIST_META_CONTEXT with > 0 or 1 queries. Also, always allocate space for the received > name, even if it doesn't match expected lengths (no point > trying to

Re: [Qemu-block] [PATCH 16/18] xen: automatically create XenQdiskDevice-s

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 16:41 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH

Re: [Qemu-block] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 12:34 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini ; > Kevin Wolf ; Max Reitz > Subject: Re: [PATCH

Re: [Qemu-block] [PATCH 15/18] xen: add a mechanism to automatically create XenDevice-s...

2018-12-06 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 December 2018 15:35 > To: Paul Durrant > Cc: qemu-block@nongnu.org; qemu-de...@nongnu.org; xen- > de...@lists.xenproject.org; Stefano Stabellini > Subject: Re: [PATCH 15/18] xen: add a mechanism to

Re: [Qemu-block] [qemu-s390x] [Qemu-devel] [PULL 2/2] iotests: simple mirror test with kvm on 1G image

2018-12-06 Thread Christian Borntraeger
On 05.12.2018 17:09, Vladimir Sementsov-Ogievskiy wrote: > 05.12.2018 18:52, Christian Borntraeger wrote: >> >> >> On 05.12.2018 14:39, Vladimir Sementsov-Ogievskiy wrote: >>> 05.12.2018 15:35, Christian Borntraeger wrote: On 05.12.2018 13:00, Vladimir Sementsov-Ogievskiy wrote:

Re: [Qemu-block] [PATCH v2 5/5] crypto: support multiple threads accessing one QCryptoBlock

2018-12-06 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 05:47:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The two thing that should be handled are cipher and ivgen. For ivgen > the solution is just mutex, as iv calculations should not be long in > comparison with encryption/decryption. And for cipher let's just keep >

Re: [Qemu-block] [PATCH v2 3/5] crypto/block: rename qcrypto_block_*crypt_helper

2018-12-06 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 05:46:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Rename qcrypto_block_*crypt_helper to qcrypto_cipher_*crypt_helper, as > it's not about QCryptoBlock. This is needed to introduce > qcrypto_block_*crypt_helper in the next commit, which will have > QCryptoBlock pointer

Re: [Qemu-block] [PATCH v2 4/5] crypto/block: introduce qcrypto_block_*crypt_helper functions

2018-12-06 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 05:46:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Introduce QCryptoBlock-based functions and use them where possible. > This is needed to implement thread-safe encrypt/decrypt operations. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > crypto/blockpriv.h |

Re: [Qemu-block] [PATCH v2 1/5] crypto/block-luks: fix memory leak in qcrypto_block_luks_create

2018-12-06 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 05:46:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Free block->cipher and block->ivgen on error path. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > crypto/block-luks.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Daniel P. Berrangé Regards,

Re: [Qemu-block] [PATCH v2 2/5] crypto/block: refactor qcrypto_block_*crypt_helper functions

2018-12-06 Thread Daniel P . Berrangé
On Wed, Dec 05, 2018 at 05:46:57PM +0300, Vladimir Sementsov-Ogievskiy wrote: > qcrypto_block_encrypt_helper and qcrypto_block_decrypt_helper are > almost identical, let's reduce code duplication and simplify further > improvements. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

[Qemu-block] [QEMU-devel][PATCH v2] aio-posix: Fix concurrent aio_poll/set_fd_handler.

2018-12-06 Thread remy . noel
From: Remy Noel It is possible for an io_poll callback to be concurrently executed along with an aio_set_fd_handlers. This can cause all sorts of problems, like a NULL callback or a bad opaque pointer. This changes set_fd_handlers so that it no longer modify existing handlers entries and

Re: [Qemu-block] util/aio-posix: Use RCU for handler insertion.

2018-12-06 Thread Remy NOEL
I did some tests and noticed the second and third patch to incur some performance loss (on a scenario using virtio device) I will therefore resubmit just the first patch alone. On 11/16/18 8:02 PM, remy.n...@blade-group.com wrote: From: Remy Noel get rid of the delete attribute. We still