[PATCH for-5.1] nbd: Fix large trim/zero requests

2020-07-22 Thread Eric Blake
Although qemu as NBD client limits requests to <2G, the NBD protocol allows clients to send requests almost all the way up to 4G. But because our block layer is not yet 64-bit clean, we accidentally wrap such requests into a negative size, and fail with EIO instead of performing the intended

Re: [PATCH v7 33/47] mirror: Deal with filters

2020-07-22 Thread Andrey Shinkevich
On 25.06.2020 18:22, Max Reitz wrote: This includes some permission limiting (for example, we only need to take the RESIZE permission for active commits where the base is smaller than the top). Use this opportunity to rename qmp_drive_mirror()'s "source" BDS to "target_backing_bs", because that

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Andrzej Jakowski
On 7/22/20 10:21 AM, Klaus Jensen wrote: > On Jul 22 10:00, Andrzej Jakowski wrote: >> On 7/22/20 12:43 AM, Klaus Jensen wrote: >>> @keith, please see below - can you comment on the Linux kernel 2 MB >>> boundary requirement for the CMB? Or should we hail Stephen (or Logan >>> maybe) since this

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Klaus Jensen
On Jul 22 10:00, Andrzej Jakowski wrote: > On 7/22/20 12:43 AM, Klaus Jensen wrote: > > @keith, please see below - can you comment on the Linux kernel 2 MB > > boundary requirement for the CMB? Or should we hail Stephen (or Logan > > maybe) since this seems to be related to p2pdma? > > > > On Jul

Re: [PATCH for-5.1 1/2] qcow2: Implement v2 zero writes with discard if possible

2020-07-22 Thread Maxim Levitsky
On Wed, 2020-07-22 at 19:14 +0200, Kevin Wolf wrote: > Am 22.07.2020 um 19:01 hat Maxim Levitsky geschrieben: > > On Mon, 2020-07-20 at 15:18 +0200, Kevin Wolf wrote: > > > qcow2 version 2 images don't support the zero flag for clusters, so for > > > write_zeroes requests, we return -ENOTSUP and

Re: [PATCH for-5.1 1/2] qcow2: Implement v2 zero writes with discard if possible

2020-07-22 Thread Kevin Wolf
Am 22.07.2020 um 19:01 hat Maxim Levitsky geschrieben: > On Mon, 2020-07-20 at 15:18 +0200, Kevin Wolf wrote: > > qcow2 version 2 images don't support the zero flag for clusters, so for > > write_zeroes requests, we return -ENOTSUP and get explicit zero buffer > > writes. If the image doesn't have

Re: [PATCH for-5.1 1/2] qcow2: Implement v2 zero writes with discard if possible

2020-07-22 Thread Maxim Levitsky
On Mon, 2020-07-20 at 15:18 +0200, Kevin Wolf wrote: > qcow2 version 2 images don't support the zero flag for clusters, so for > write_zeroes requests, we return -ENOTSUP and get explicit zero buffer > writes. If the image doesn't have a backing file, we can do better: Just > discard the

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Andrzej Jakowski
On 7/22/20 12:43 AM, Klaus Jensen wrote: > @keith, please see below - can you comment on the Linux kernel 2 MB > boundary requirement for the CMB? Or should we hail Stephen (or Logan > maybe) since this seems to be related to p2pdma? > > On Jul 21 14:54, Andrzej Jakowski wrote: >> On 7/15/20 1:06

[PATCH for-5.1] iotests: Select a default machine for the rx and avr targets

2020-07-22 Thread Thomas Huth
If you are building only with either the new rx-softmmu or avr-softmmu target, "make check-block" fails a couple of tests since there is no default machine defined in these new targets. We have to select a machine in the "check" script for these, just like we already do for the arm- and

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 18:43, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 06:40:10PM +0300, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 18:21, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 06:04:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 16:47, Vladimir Sementsov-Ogievskiy

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 06:40:10PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 22.07.2020 18:21, Daniel P. Berrangé wrote: > > On Wed, Jul 22, 2020 at 06:04:53PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > 22.07.2020 16:47, Vladimir Sementsov-Ogievskiy wrote: > > > > 22.07.2020 15:53,

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 18:21, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 06:04:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 16:47, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 15:53, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 03:43:54PM +0300, Vladimir Sementsov-Ogievskiy

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 06:04:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 22.07.2020 16:47, Vladimir Sementsov-Ogievskiy wrote: > > 22.07.2020 15:53, Daniel P. Berrangé wrote: > > > On Wed, Jul 22, 2020 at 03:43:54PM +0300, Vladimir Sementsov-Ogievskiy > > > wrote: > > > > 22.07.2020 14:21,

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 16:47, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 15:53, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 03:43:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 14:21, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 02:00:25PM +0300, Vladimir Sementsov-Ogievskiy

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 15:53, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 03:43:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 14:21, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 02:00:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: 20.07.2020 21:29, Daniel P. Berrangé wrote: On

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
22.07.2020 14:21, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 02:00:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: 20.07.2020 21:29, Daniel P. Berrangé wrote: On Mon, Jul 20, 2020 at 09:07:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: Utilize new socket API to make a non-blocking

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 03:43:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 22.07.2020 14:21, Daniel P. Berrangé wrote: > > On Wed, Jul 22, 2020 at 02:00:25PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > 20.07.2020 21:29, Daniel P. Berrangé wrote: > > > > On Mon, Jul 20, 2020 at

Re: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Add new parameters to configure future backup features. The patch > doesn't introduce aio backup requests (so we actually have only one > worker) neither requests larger than one cluster. Still, formally we > satisfy these maximums anyway,

Re: [PATCH v2 10/20] job: call job_enter from job_user_pause

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > If main job coroutine called job_yield (while some background process > is in progress), we should give it a chance to call job_pause_point(). > It will be used in backup, when moved on async block-copy. > > Signed-off-by: Vladimir

Re: [PATCH 1/2] pci: pass along the return value of dma_memory_rw

2020-07-22 Thread Michael S. Tsirkin
On Mon, Jun 29, 2020 at 10:20:52PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Some devices might want to know the return value of dma_memory_rw, so > pass it along instead of ignoring it. > > There are no existing users of the return value, so this patch should be > safe. > >

Re: [PATCH v2 09/20] blockjob: add set_speed to BlockJobDriver

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > We are going to use async block-copy call in backup, so we'll need to > passthrough setting backup speed to block-copy call. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/blockjob_int.h | 2 ++ > blockjob.c

Re: [PATCH v2 08/20] block/block-copy: add block_copy_cancel

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > Add function to cancel running async block-copy call. It will be used > in backup. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 7 +++ > block/block-copy.c | 22 +++--- >

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 02:00:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 20.07.2020 21:29, Daniel P. Berrangé wrote: > > On Mon, Jul 20, 2020 at 09:07:14PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > Utilize new socket API to make a non-blocking connect for inet sockets. > > > >

Re: [PATCH v2 1/3] migration: Add block-bitmap-mapping parameter

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
21.07.2020 11:02, Max Reitz wrote: On 20.07.20 18:31, Vladimir Sementsov-Ogievskiy wrote: 16.07.2020 16:53, Max Reitz wrote: This migration parameter allows mapping block node names and bitmap names to aliases for the purpose of block dirty bitmap migration. This way, management tools can use

Re: [PATCH v2 07/20] block/block-copy: add ratelimit to block-copy

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > We are going to directly use one async block-copy operation for backup > job, so we need rate limitator. %s/limitator/limiter/g, I think. > We want to maintain current backup behavior: only background copying is > limited and

Re: [PATCH 3/4] io/channel-socket: implement non-blocking connect

2020-07-22 Thread Vladimir Sementsov-Ogievskiy
20.07.2020 21:29, Daniel P. Berrangé wrote: On Mon, Jul 20, 2020 at 09:07:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: Utilize new socket API to make a non-blocking connect for inet sockets. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/io/channel-socket.h | 14 +++

Re: [PATCH v2 2/4] m25p80: Improve command handling for Jedec commands

2020-07-22 Thread Philippe Mathieu-Daudé
On 7/22/20 10:02 AM, Cédric Le Goater wrote: > On 7/21/20 9:57 PM, Guenter Roeck wrote: >> On 7/21/20 10:36 AM, Cédric Le Goater wrote: >>> Hello, >>> >>> On 2/6/20 7:32 PM, Guenter Roeck wrote: When requesting JEDEC data using the JEDEC_READ command, the Linux kernel always requests 6

Re: [PATCH v2 06/20] block/block-copy: add max_chunk and max_workers parameters

2020-07-22 Thread Max Reitz
On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: > They will be used for backup. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 5 + > block/block-copy.c | 10 -- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v2 0/3] migration: Add block-bitmap-mapping parameter

2020-07-22 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > RFC v1: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00912.html > RFC v2: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00915.html > v1: https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg09792.html > > Branch:

Re: [PATCH v2 1/3] migration: Add block-bitmap-mapping parameter

2020-07-22 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > This migration parameter allows mapping block node names and bitmap > names to aliases for the purpose of block dirty bitmap migration. > > This way, management tools can use different node and bitmap names on > the source and destination and pass the

[PATCH for-5.2 v3 2/3] iotests.py: Add wait_for_runstate()

2020-07-22 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3590ed78a0..20645a6e7d 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -28,6

[PATCH for-5.2 v3 3/3] iotests: Test node/bitmap aliases during migration

2020-07-22 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/300 | 515 + tests/qemu-iotests/300.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 521 insertions(+) create mode 100755 tests/qemu-iotests/300 create mode 100644

[PATCH for-5.2 v3 1/3] migration: Add block-bitmap-mapping parameter

2020-07-22 Thread Max Reitz
This migration parameter allows mapping block node names and bitmap names to aliases for the purpose of block dirty bitmap migration. This way, management tools can use different node and bitmap names on the source and destination and pass the mapping of how bitmaps are to be transferred to qemu

[PATCH for-5.2 v3 0/3] migration: Add block-bitmap-mapping parameter

2020-07-22 Thread Max Reitz
RFC v1: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00912.html RFC v2: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00915.html v1: https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg09792.html v2:

Re: [PATCH v2 2/4] m25p80: Improve command handling for Jedec commands

2020-07-22 Thread Cédric Le Goater
On 7/21/20 9:57 PM, Guenter Roeck wrote: > On 7/21/20 10:36 AM, Cédric Le Goater wrote: >> Hello, >> >> On 2/6/20 7:32 PM, Guenter Roeck wrote: >>> When requesting JEDEC data using the JEDEC_READ command, the Linux kernel >>> always requests 6 bytes. The current implementation only returns three

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Klaus Jensen
@keith, please see below - can you comment on the Linux kernel 2 MB boundary requirement for the CMB? Or should we hail Stephen (or Logan maybe) since this seems to be related to p2pdma? On Jul 21 14:54, Andrzej Jakowski wrote: > On 7/15/20 1:06 AM, Klaus Jensen wrote: > > Hi Andrzej, > > > >