Re: [Qemu-block] [PATCH] block: gluster: Probe alignment limits

2019-08-22 Thread Niels de Vos
On Wed, Aug 21, 2019 at 07:04:17PM +0200, Max Reitz wrote: > On 17.08.19 23:21, Nir Soffer wrote: > > Implement alignment probing similar to file-posix, by reading from the > > first 4k of the image. > > > > Before this change, provisioning a VM on storage with sector size of > > 4096 bytes would

Re: [Qemu-block] [PATCH 0/3] block/io_uring: fix EINTR and resubmit short reads

2019-08-22 Thread Stefan Hajnoczi
On Wed, Aug 21, 2019 at 06:20:39PM -0400, John Snow wrote: > > > On 7/15/19 4:19 PM, Stefan Hajnoczi wrote: > > Short reads are possible with cache=writeback (see Patch 3 for details). > > Handle this by resubmitting requests until the read is completed. > > > > Patch 1 adds trace events useful

Re: [Qemu-block] [Qemu-devel] [PATCH 05/13] qcrypto-luks: clear the masterkey and password before freeing them always

2019-08-22 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 08:12:51PM +0200, Max Reitz wrote: > On 14.08.19 22:22, Maxim Levitsky wrote: > > While there are other places where these are still stored in memory, > > this is still one less key material area that can be sniffed with > > various side channel attacks > > > > > > > >

Re: [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-22 Thread Nir Soffer
Max, did you have time to look at this? On Sat, Aug 17, 2019 at 12:21 AM Nir Soffer wrote: > When creating an image with preallocation "off" or "falloc", the first > block of the image is typically not allocated. When using Gluster > storage backed by XFS filesystem, reading this block using

Re: [Qemu-block] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 11:29 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 15, 2019 at 05:40:11PM -0400, John Snow wrote: > > > > > > On 8/14/19 4:22 PM, Maxim Levitsky wrote: > > > This is also a preparation for key read/write/erase functions > > > > > > > This is a matter of taste and I am

Re: [Qemu-block] Broken aarch64 by qcow2: skip writing zero buffers to empty COW areas [v2]

2019-08-22 Thread Lukáš Doktor
Dne 21. 08. 19 v 19:51 Max Reitz napsal(a): > On 21.08.19 16:14, Lukáš Doktor wrote: >> Hello guys, >> >> First attempt was rejected due to zip attachment, let's try it again with >> just Avocado-vt debug.log and serial console log files attached. >> >> I bisected a regression on aarch64 all the

Re: [Qemu-block] [PATCH 12/13] qemu-img: implement key management

2019-08-22 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 08:29:55PM +0200, Max Reitz wrote: > On 14.08.19 22:22, Maxim Levitsky wrote: > > Signed-off-by: Maxim Levitsky > > --- > > block/crypto.c | 16 ++ > > block/crypto.h | 3 + > > qemu-img-cmds.hx | 13 + > > qemu-img.c | 140

Re: [Qemu-block] [PATCH 10/13] block/crypto: implement the encryption key management

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 12:29 +0100, Daniel P. Berrangé wrote: > On Wed, Aug 14, 2019 at 11:22:16PM +0300, Maxim Levitsky wrote: > > This implements the encryption key management > > using the generic code in qcrypto layer > > > > This code adds another 'write_func' because the initialization > >

Re: [Qemu-block] Broken aarch64 by qcow2: skip writing zero buffers to empty COW areas [v2]

2019-08-22 Thread Max Reitz
(CC-ing Paolo because of the XFS connection, and Stefan because why not.) On 22.08.19 13:27, Lukáš Doktor wrote: > Dne 21. 08. 19 v 19:51 Max Reitz napsal(a): >> On 21.08.19 16:14, Lukáš Doktor wrote: >>> Hello guys, >>> >>> First attempt was rejected due to zip attachment, let's try it again

Re: [Qemu-block] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:09PM +0300, Maxim Levitsky wrote: > With upcoming key management, the header will > need to be stored after the image is created. > > Extracting load header isn't strictly needed, but > do this anyway for the symmetry. > > Also I extracted a function that does basic

Re: [Qemu-block] [Qemu-devel] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 12:10 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 22, 2019 at 02:04:28PM +0300, Maxim Levitsky wrote: > > On Thu, 2019-08-22 at 11:29 +0100, Daniel P. Berrangé wrote: > > > On Thu, Aug 15, 2019 at 05:40:11PM -0400, John Snow wrote: > > > > > > > > > > > > On 8/14/19 4:22

Re: [Qemu-block] [PATCH 09/13] qcrypto-luks: implement the encryption key management

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:15PM +0300, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 374 +++- > 1 file changed, 373 insertions(+), 1 deletion(-) > > diff --git a/crypto/block-luks.c b/crypto/block-luks.c > index

Re: [Qemu-block] [PATCH 10/13] block/crypto: implement the encryption key management

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:16PM +0300, Maxim Levitsky wrote: > This implements the encryption key management > using the generic code in qcrypto layer > > This code adds another 'write_func' because the initialization > write_func works directly on the underlying file, > because during the

Re: [Qemu-block] QEMU bitmap backup usability FAQ

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 0:19, John Snow wrote: > > > On 8/21/19 10:21 AM, Vladimir Sementsov-Ogievskiy wrote: >> [CC Nikolay] >> >> 21.08.2019 1:25, John Snow wrote: >>> Hi, downstream here at Red Hat I've been fielding some questions about >>> the usability and feature readiness of Bitmaps (and related

Re: [Qemu-block] [PATCH 00/13] RFC: luks/encrypted qcow2 key management

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:06PM +0300, Maxim Levitsky wrote: > Hi! > > This patch series implements key management for luks based encryption > It supports both raw luks images and qcow2 encrypted images. > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1731898 > > There are still

Re: [Qemu-block] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-22 Thread Daniel P . Berrangé
On Thu, Aug 15, 2019 at 05:40:11PM -0400, John Snow wrote: > > > On 8/14/19 4:22 PM, Maxim Levitsky wrote: > > This is also a preparation for key read/write/erase functions > > > > This is a matter of taste and I am not usually reviewing LUKS patches > (So don't take me too seriously), but I

Re: [Qemu-block] [Qemu-devel] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-22 Thread Daniel P . Berrangé
On Thu, Aug 22, 2019 at 01:43:05AM +0300, Maxim Levitsky wrote: > On Tue, 2019-08-20 at 20:01 +0200, Max Reitz wrote: > > On 14.08.19 22:22, Maxim Levitsky wrote: > > > With upcoming key management, the header will > > > need to be stored after the image is created. > > > > > > Extracting load

Re: [Qemu-block] [Qemu-devel] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-22 Thread Daniel P . Berrangé
On Thu, Aug 22, 2019 at 01:43:05AM +0300, Maxim Levitsky wrote: > On Tue, 2019-08-20 at 20:01 +0200, Max Reitz wrote: > > On 14.08.19 22:22, Maxim Levitsky wrote: > > > With upcoming key management, the header will > > > need to be stored after the image is created. > > > > > > Extracting load

Re: [Qemu-block] [PATCH 04/13] qcrypto-luks: refactoring: simplify the math used for keyslot locations

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:10PM +0300, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 64 +++-- > 1 file changed, 38 insertions(+), 26 deletions(-) > > diff --git a/crypto/block-luks.c b/crypto/block-luks.c > index

Re: [Qemu-block] [PATCH 07/13] block: add manage-encryption command (qmp and blockdev)

2019-08-22 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 08:27:48PM +0200, Max Reitz wrote: > On 14.08.19 22:22, Maxim Levitsky wrote: > > This adds: > > > > * x-blockdev-update-encryption and x-blockdev-erase-encryption qmp commands > > Both commands take the QCryptoKeyManageOptions > > the x-blockdev-update-encryption is

Re: [Qemu-block] [PATCH 08/13] qcrypto: add the plumbing for encryption management

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:14PM +0300, Maxim Levitsky wrote: > This adds qcrypto_block_manage_encryption, which > is thin wrapper around manage_encryption of the crypto driver > which is also added > > Signed-off-by: Maxim Levitsky > --- > crypto/block.c | 29

Re: [Qemu-block] [PATCH v8 2/3] block/nbd: nbd reconnect

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
21.08.2019 20:35, Eric Blake wrote: > On 8/21/19 11:52 AM, Vladimir Sementsov-Ogievskiy wrote: >> Implement reconnect. To achieve this: >> >> 1. add new modes: >> connecting-wait: means, that reconnecting is in progress, and there >> were small number of reconnect attempts, so all

Re: [Qemu-block] [Qemu-devel] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 11:32 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 22, 2019 at 01:43:05AM +0300, Maxim Levitsky wrote: > > On Tue, 2019-08-20 at 20:01 +0200, Max Reitz wrote: > > > On 14.08.19 22:22, Maxim Levitsky wrote: > > > > With upcoming key management, the header will > > > > need

Re: [Qemu-block] [Qemu-devel] [PATCH 05/13] qcrypto-luks: clear the masterkey and password before freeing them always

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 11:49 +0100, Daniel P. Berrangé wrote: > On Tue, Aug 20, 2019 at 08:12:51PM +0200, Max Reitz wrote: > > On 14.08.19 22:22, Maxim Levitsky wrote: > > > While there are other places where these are still stored in memory, > > > this is still one less key material area that can

Re: [Qemu-block] [Qemu-devel] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-22 Thread Daniel P . Berrangé
On Thu, Aug 22, 2019 at 02:04:28PM +0300, Maxim Levitsky wrote: > On Thu, 2019-08-22 at 11:29 +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 15, 2019 at 05:40:11PM -0400, John Snow wrote: > > > > > > > > > On 8/14/19 4:22 PM, Maxim Levitsky wrote: > > > > This is also a preparation for key

Re: [Qemu-block] [PATCH 08/13] qcrypto: add the plumbing for encryption management

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 12:16 +0100, Daniel P. Berrangé wrote: > On Wed, Aug 14, 2019 at 11:22:14PM +0300, Maxim Levitsky wrote: > > This adds qcrypto_block_manage_encryption, which > > is thin wrapper around manage_encryption of the crypto driver > > which is also added > > > > Signed-off-by:

Re: [Qemu-block] [PATCH 08/13] qcrypto: add the plumbing for encryption management

2019-08-22 Thread Daniel P . Berrangé
On Thu, Aug 22, 2019 at 02:47:03PM +0300, Maxim Levitsky wrote: > On Thu, 2019-08-22 at 12:16 +0100, Daniel P. Berrangé wrote: > > On Wed, Aug 14, 2019 at 11:22:14PM +0300, Maxim Levitsky wrote: > > > This adds qcrypto_block_manage_encryption, which > > > is thin wrapper around manage_encryption

Re: [Qemu-block] [PATCH] virtio-blk: Cancel the pending BH when the dataplane is reset

2019-08-22 Thread Philippe Mathieu-Daudé
On 8/22/19 3:01 PM, Stefan Hajnoczi wrote: > On Fri, Aug 16, 2019 at 07:15:03PM +0200, Philippe Mathieu-Daudé wrote: >> When 'system_reset' is called, the main loop clear the memory >> region cache before the BH has a chance to execute. Later when >> the deferred function is called, some

Re: [Qemu-block] Broken aarch64 by qcow2: skip writing zero buffers to empty COW areas [v2]

2019-08-22 Thread Max Reitz
On 22.08.19 14:09, Max Reitz wrote: > (CC-ing Paolo because of the XFS connection, and Stefan because why not.) > > On 22.08.19 13:27, Lukáš Doktor wrote: >> Dne 21. 08. 19 v 19:51 Max Reitz napsal(a): >>> On 21.08.19 16:14, Lukáš Doktor wrote: Hello guys, First attempt was

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-22 Thread Stefan Hajnoczi
On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is new parameter qiov_offset for io path, to avoid > a lot of places with same pattern of creating local_qiov or hd_qiov > variables. > > These series also includes my > "[Qemu-devel] [PATCH 0/2]

[Qemu-block] [PATCH 2/2] iotests: Test reverse sub-cluster qcow2 writes

2019-08-22 Thread Max Reitz
This exercises the regression introduced in commit 50ba5b2d994853b38fed10e0841b119da0f8b8e5. On my machine, it has close to a 50 % false-negative rate, but that should still be sufficient to test the fix. Signed-off-by: Max Reitz --- tests/qemu-iotests/265 | 67

Re: [Qemu-block] [Qemu-devel] [PATCH] pr-manager: Fix invalid g_free() crash bug

2019-08-22 Thread Philippe Mathieu-Daudé
On 8/22/19 3:38 PM, Markus Armbruster wrote: > pr_manager_worker() passes its @opaque argument to g_free(). Wrong; > it points to pr_manager_worker()'s automatic @data. Broken when > commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix > by deleting the g_free(). > > Fixes:

Re: [Qemu-block] [Qemu-devel] [PATCH 01/13] block-crypto: misc refactoring

2019-08-22 Thread Maxim Levitsky
On Thu, 2019-08-22 at 16:34 +0200, Max Reitz wrote: > On 22.08.19 02:05, Maxim Levitsky wrote: > > On Tue, 2019-08-20 at 18:38 +0200, Max Reitz wrote: > > > On 14.08.19 22:22, Maxim Levitsky wrote: > > > > * rename the write_func to create_write_func, > > > > and init_func to create_init_func >

Re: [Qemu-block] Broken aarch64 by qcow2: skip writing zero buffers to empty COW areas [v2]

2019-08-22 Thread Max Reitz
On 22.08.19 17:25, Max Reitz wrote: > On 22.08.19 14:09, Max Reitz wrote: >> (CC-ing Paolo because of the XFS connection, and Stefan because why not.) >> >> On 22.08.19 13:27, Lukáš Doktor wrote: >>> Dne 21. 08. 19 v 19:51 Max Reitz napsal(a): On 21.08.19 16:14, Lukáš Doktor wrote: >

[Qemu-block] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()

2019-08-22 Thread Max Reitz
Lukàš ran over a nasty regression in our xfs_write_zeroes() function (sorry, my fault) made apparent by a recent patch from Anton that makes qcow2 images heavily exercise the offending code path. This series fixes the bug and adds a test to prevent it from reoccurring. Max Reitz (2):

[Qemu-block] [PATCH 1/2] block/file-posix: Fix xfs_write_zeroes()

2019-08-22 Thread Max Reitz
Calling ftruncate() in xfs_write_zeroes() is dangerous because it may yield and then discard data that parallel write requests have written past the old EOF in the meantime. We must not use it here. Instead, return -ENOTSUP and let the more generic fallocate code handle writing zeroes past the

Re: [Qemu-block] Broken aarch64 by qcow2: skip writing zero buffers to empty COW areas [v2]

2019-08-22 Thread Max Reitz
On 22.08.19 17:40, Max Reitz wrote: > On 22.08.19 17:25, Max Reitz wrote: >> On 22.08.19 14:09, Max Reitz wrote: >>> (CC-ing Paolo because of the XFS connection, and Stefan because why not.) >>> >>> On 22.08.19 13:27, Lukáš Doktor wrote: Dne 21. 08. 19 v 19:51 Max Reitz napsal(a): > On

Re: [Qemu-block] [PATCH 06/13] qcrypto-luks: implement more rigorous header checking

2019-08-22 Thread Daniel P . Berrangé
On Wed, Aug 14, 2019 at 11:22:12PM +0300, Maxim Levitsky wrote: > Check that keyslots don't overlap with the data, > and check that keyslots don't overlap with each other. > (this is done using naive O(n^2) nested loops, > but since there are just 8 keyslots, this doens't really matter. > >

Re: [Qemu-block] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-22 Thread Stefan Hajnoczi
On Thu, Aug 15, 2019 at 11:12:35AM +, Vladimir Sementsov-Ogievskiy wrote: > 29.07.2019 18:24, Stefan Hajnoczi wrote: > > On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > >> Hi all! > >> > >> Here is new parameter qiov_offset for io path, to avoid > >> a lot

Re: [Qemu-block] [Qemu-devel] [QEMU] [PATCH v5 3/8] bootdevice: Add interface to gather LCHS

2019-08-22 Thread Sam Eiderman via Qemu-block
> I’ve got a couple of “undelivered mail returned to sender” mails for Sam > recently, but anyway... - shmuel.eider...@oracle.com + sam...@google.com > It doesn’t look like any caller actually passes a NULL @dev, so why not > drop the @suffix part? Just copied it from the bootindex

[Qemu-block] [PULL 1/2] util/async: hold AioContext ref to prevent use-after-free

2019-08-22 Thread Stefan Hajnoczi
The tests/test-bdrv-drain /bdrv-drain/iothread/drain test case does the following: 1. The preadv coroutine calls aio_bh_schedule_oneshot() and then yields. 2. The one-shot BH executes in another AioContext. All it does is call aio_co_wakeup(preadv_co). 3. The preadv coroutine is re-entered

[Qemu-block] [PULL 2/2] vhost-user-scsi: prevent using uninitialized vqs

2019-08-22 Thread Stefan Hajnoczi
From: Raphael Norwitz Of the 3 virtqueues, seabios only sets cmd, leaving ctrl and event without a physical address. This can cause vhost_verify_ring_part_mapping to return ENOMEM, causing the following logs: qemu-system-x86_64: Unable to map available ring for ring 0 qemu-system-x86_64: Verify

[Qemu-block] [PULL 0/2] Block patches

2019-08-22 Thread Stefan Hajnoczi
The following changes since commit 33f18cf7dca7741d3647d514040904ce83edd73d: Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190821-pull-request' into staging (2019-08-21 15:18:50 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git

Re: [Qemu-block] [PATCH] virtio-blk: Cancel the pending BH when the dataplane is reset

2019-08-22 Thread Stefan Hajnoczi
On Fri, Aug 16, 2019 at 02:35:56PM -0400, John Snow wrote: > > > On 8/16/19 1:15 PM, Philippe Mathieu-Daudé wrote: > > When 'system_reset' is called, the main loop clear the memory > > region cache before the BH has a chance to execute. Later when > > the deferred function is called, some

Re: [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-22 Thread Max Reitz
On 16.08.19 23:21, Nir Soffer wrote: > When creating an image with preallocation "off" or "falloc", the first > block of the image is typically not allocated. When using Gluster > storage backed by XFS filesystem, reading this block using direct I/O > succeeds regardless of request length, fooling

Re: [Qemu-block] [Qemu-devel] [PATCH 07/13] block: add manage-encryption command (qmp and blockdev)

2019-08-22 Thread Markus Armbruster
Maxim Levitsky writes: > On Wed, 2019-08-21 at 13:47 +0200, Markus Armbruster wrote: >> Maxim Levitsky writes: >> >> > This adds: >> > >> > * x-blockdev-update-encryption and x-blockdev-erase-encryption qmp commands >> > Both commands take the QCryptoKeyManageOptions >> > the

Re: [Qemu-block] [Qemu-devel] [PATCH 01/13] block-crypto: misc refactoring

2019-08-22 Thread Max Reitz
On 22.08.19 02:05, Maxim Levitsky wrote: > On Tue, 2019-08-20 at 18:38 +0200, Max Reitz wrote: >> On 14.08.19 22:22, Maxim Levitsky wrote: >>> * rename the write_func to create_write_func, >>> and init_func to create_init_func >>> this is preparation for other write_func that will >>> be

Re: [Qemu-block] [PATCH] virtio-blk: Cancel the pending BH when the dataplane is reset

2019-08-22 Thread Stefan Hajnoczi
On Fri, Aug 16, 2019 at 07:15:03PM +0200, Philippe Mathieu-Daudé wrote: > When 'system_reset' is called, the main loop clear the memory > region cache before the BH has a chance to execute. Later when > the deferred function is called, some assumptions that were > made when scheduling them are no

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/5] socket: Add backlog parameter to socket_listen

2019-08-22 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 01:17:59PM +0200, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > On Tue, Aug 20, 2019 at 12:48:32PM +0200, Juan Quintela wrote: > >> Current parameter was always one. We continue with that value for now > >> in all callers. > >> > >> Signed-off-by: Juan Quintela >

Re: [Qemu-block] [Qemu-devel] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-22 Thread Max Reitz
On 22.08.19 01:59, Maxim Levitsky wrote: > On Tue, 2019-08-20 at 19:36 +0200, Max Reitz wrote: >> On 14.08.19 22:22, Maxim Levitsky wrote: >>> This is also a preparation for key read/write/erase functions >>> >>> * use master key len from the header >>> * prefer to use crypto params in the

Re: [Qemu-block] [Qemu-devel] [PATCH 16/16] nvme: support multiple namespaces

2019-08-22 Thread Ross Lagerwall
On 7/5/19 8:23 AM, Klaus Birkelund Jensen wrote: This adds support for multiple namespaces by introducing a new 'nvme-ns' device model. The nvme device creates a bus named from the device name ('id'). The nvme-ns devices then connect to this and registers themselves with the nvme device. This

[Qemu-block] [PATCH] pr-manager: Fix invalid g_free() crash bug

2019-08-22 Thread Markus Armbruster
pr_manager_worker() passes its @opaque argument to g_free(). Wrong; it points to pr_manager_worker()'s automatic @data. Broken when commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix by deleting the g_free(). Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e Cc:

Re: [Qemu-block] [PATCH 12/13] qemu-img: implement key management

2019-08-22 Thread Max Reitz
On 22.08.19 13:32, Daniel P. Berrangé wrote: > On Tue, Aug 20, 2019 at 08:29:55PM +0200, Max Reitz wrote: >> On 14.08.19 22:22, Maxim Levitsky wrote: >>> Signed-off-by: Maxim Levitsky >>> --- >>> block/crypto.c | 16 ++ >>> block/crypto.h | 3 + >>> qemu-img-cmds.hx | 13 + >>>

Re: [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-22 Thread Nir Soffer
On Thu, Aug 22, 2019 at 5:28 PM Max Reitz wrote: > On 16.08.19 23:21, Nir Soffer wrote: > > When creating an image with preallocation "off" or "falloc", the first > > block of the image is typically not allocated. When using Gluster > > storage backed by XFS filesystem, reading this block using

Re: [Qemu-block] [PATCH] pr-manager: Fix invalid g_free() crash bug

2019-08-22 Thread Paolo Bonzini
On 22/08/19 15:38, Markus Armbruster wrote: > pr_manager_worker() passes its @opaque argument to g_free(). Wrong; > it points to pr_manager_worker()'s automatic @data. Broken when > commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix > by deleting the g_free(). > > Fixes:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()

2019-08-22 Thread Paolo Bonzini
On 22/08/19 18:26, Max Reitz wrote: > Lukàš ran over a nasty regression in our xfs_write_zeroes() function > (sorry, my fault) made apparent by a recent patch from Anton that makes > qcow2 images heavily exercise the offending code path. > > This series fixes the bug and adds a test to prevent it

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] block/file-posix: Fix xfs_write_zeroes()

2019-08-22 Thread Max Reitz
On 22.08.19 18:53, Paolo Bonzini wrote: > On 22/08/19 18:26, Max Reitz wrote: >> Lukàš ran over a nasty regression in our xfs_write_zeroes() function >> (sorry, my fault) made apparent by a recent patch from Anton that makes >> qcow2 images heavily exercise the offending code path. >> >> This

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 20:24, Vladimir Sementsov-Ogievskiy wrote: > 22.08.2019 18:50, Stefan Hajnoczi wrote: >> On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: >>> Hi all! >>> >>> Here is new parameter qiov_offset for io path, to avoid >>> a lot of places with same pattern of

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 20:39, Vladimir Sementsov-Ogievskiy wrote: > 22.08.2019 20:24, Vladimir Sementsov-Ogievskiy wrote: >> 22.08.2019 18:50, Stefan Hajnoczi wrote: >>> On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy >>> wrote: Hi all! Here is new parameter qiov_offset

Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 18:50, Stefan Hajnoczi wrote: > On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here is new parameter qiov_offset for io path, to avoid >> a lot of places with same pattern of creating local_qiov or hd_qiov >> variables. >> >> These series

Re: [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-22 Thread Max Reitz
On 22.08.19 18:39, Nir Soffer wrote: > On Thu, Aug 22, 2019 at 5:28 PM Max Reitz > wrote: > > On 16.08.19 23:21, Nir Soffer wrote: > > When creating an image with preallocation "off" or "falloc", the first > > block of the image is typically not allocated.

[Qemu-block] [PATCH] block: workaround for unaligned byte range in fallocate()

2019-08-22 Thread Andrey Shinkevich
Revert the commit 118f99442d 'block/io.c: fix for the allocation failure' and make better error handling for the file systems that do not support fallocate() for the unaligned byte range. Allow falling back to pwrite in case fallocate() returns EINVAL. Suggested-by: Kevin Wolf Suggested-by: Eric

Re: [Qemu-block] [PATCH] block: posix: Always allocate the first block

2019-08-22 Thread Nir Soffer
On Thu, Aug 22, 2019 at 9:11 PM Max Reitz wrote: > On 22.08.19 18:39, Nir Soffer wrote: > > On Thu, Aug 22, 2019 at 5:28 PM Max Reitz > > wrote: > > > > On 16.08.19 23:21, Nir Soffer wrote: > > > When creating an image with preallocation "off" or "falloc", the

Re: [Qemu-block] [PATCH] block: gluster: Probe alignment limits

2019-08-22 Thread Nir Soffer
On Thu, Aug 22, 2019 at 10:03 AM Niels de Vos wrote: > On Wed, Aug 21, 2019 at 07:04:17PM +0200, Max Reitz wrote: > > On 17.08.19 23:21, Nir Soffer wrote: > > > Implement alignment probing similar to file-posix, by reading from the > > > first 4k of the image. > > > > > > Before this change,

Re: [Qemu-block] [PATCH] block: workaround for unaligned byte range in fallocate()

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 21:55, Vladimir Sementsov-Ogievskiy wrote: > 22.08.2019 21:31, Andrey Shinkevich wrote: >> Revert the commit 118f99442d 'block/io.c: fix for the allocation failure' >> and make better error handling for the file systems that do not support >> fallocate() for the unaligned byte range.

Re: [Qemu-block] [PATCH] block: workaround for unaligned byte range in fallocate()

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
22.08.2019 21:31, Andrey Shinkevich wrote: > Revert the commit 118f99442d 'block/io.c: fix for the allocation failure' > and make better error handling for the file systems that do not support > fallocate() for the unaligned byte range. Allow falling back to pwrite > in case fallocate() returns

Re: [Qemu-block] [PATCH] block: workaround for unaligned byte range in fallocate()

2019-08-22 Thread Eric Blake
On 8/22/19 1:31 PM, Andrey Shinkevich wrote: > Revert the commit 118f99442d 'block/io.c: fix for the allocation failure' > and make better error handling for the file systems that do not support s/make/use/ > fallocate() for the unaligned byte range. Allow falling back to pwrite s/the/an/ > in

Re: [Qemu-block] [Qemu-devel] [PULL 2/3] tests: Run the iotests during "make check" again

2019-08-22 Thread Paolo Bonzini
On 17/08/19 10:54, Thomas Huth wrote: > People often forget to run the iotests before submitting patches or pull > requests - this is likely due to the fact that we do not run the tests > during our mandatory "make check" tests yet. Now that we've got a proper > "auto" group of iotests that should

[Qemu-block] [PATCH 1/2] vhost-user-blk: prevent using uninitialized vqs

2019-08-22 Thread Raphael Norwitz
Same rational as: e6cc11d64fc998c11a4dfcde8fda3fc33a74d844 Of the 3 virtqueues, seabios only sets cmd, leaving ctrl and event without a physical address. This can cause vhost_verify_ring_part_mapping to return ENOMEM, causing the following logs: qemu-system-x86_64: Unable to map available ring

Re: [Qemu-block] [PATCH 1/2] vhost-user-blk: prevent using uninitialized vqs

2019-08-22 Thread yuchenlin via Qemu-block
Raphael Norwitz 於 2019-08-23 04:16 寫道: > > Same rational as: e6cc11d64fc998c11a4dfcde8fda3fc33a74d844 > > Of the 3 virtqueues, seabios only sets cmd, leaving ctrl > and event without a physical address. This can cause > vhost_verify_ring_part_mapping to return ENOMEM, causing > the following

Re: [Qemu-block] [PATCH v6 38/42] iotests: Let complete_and_wait() work with commit

2019-08-22 Thread Vladimir Sementsov-Ogievskiy
09.08.2019 19:14, Max Reitz wrote: > complete_and_wait() and wait_ready() currently only work for mirror > jobs. Let them work for active commit jobs, too. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/iotests.py | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >