Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-05-03 Thread Mark Cave-Ayland
On 27/04/2023 13:55, BALATON Zoltan wrote: On Thu, 27 Apr 2023, Mark Cave-Ayland wrote: On 27/04/2023 00:24, BALATON Zoltan wrote: On Wed, 26 Apr 2023, Bernhard Beschow wrote: Am 26. April 2023 11:41:54 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: Allows to u

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-05-03 Thread Mark Cave-Ayland
On 27/04/2023 19:15, Bernhard Beschow wrote: Am 27. April 2023 10:52:17 UTC schrieb Mark Cave-Ayland : On 26/04/2023 21:14, Bernhard Beschow wrote: Am 26. April 2023 18:18:35 UTC schrieb Bernhard Beschow : Am 26. April 2023 11:37:48 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Be

Re: [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 19:50, Kevin Wolf wrote: Socket paths need to be short to avoid failures. This is why there is a iotests.sock_dir (defaulting to /tmp) separate from the disk image base directory. Make use of it to fix failures in too deeply nested test directories. Fixes: ab7f7e67a7e7b49964109501df

Re: [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path

2023-05-03 Thread Eric Blake
On Wed, May 03, 2023 at 06:50:19PM +0200, Kevin Wolf wrote: > Socket paths need to be short to avoid failures. This is why there is a > iotests.sock_dir (defaulting to /tmp) separate from the disk image base > directory. > > Make use of it to fix failures in too deeply nested test directories. >

Re: [PATCH] migration: Fix block_bitmap_mapping migration

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 21:10, Juan Quintela wrote: It is valid that params->has_block_bitmap_mapping is true and params->block_bitmap_mapping is NULL. So we can't use the trick of having a single function. Move to two functions one for each value and the tests are fixed. Fixes: b804b35b1c8a0edfd127ac2081

[PULL 2/2] block/export: call blk_set_dev_ops(blk, NULL, NULL)

2023-05-03 Thread Eric Blake
From: Stefan Hajnoczi Most export types install BlockDeviceOps pointers. It is easy to forget to remove them because that happens automatically via the "drive" qdev property in hw/ but not block/export/. Put blk_set_dev_ops(blk, NULL, NULL) calls in the core export.c code so the export types don

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 20:15, Juan Quintela wrote: Kevin Wolf wrote: Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: Notice that we changed the test of ->has_block_bitmap_mapping for the test that block_bitmap_mapping is not NULL. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogiev

[PATCH] migration: Fix block_bitmap_mapping migration

2023-05-03 Thread Juan Quintela
It is valid that params->has_block_bitmap_mapping is true and params->block_bitmap_mapping is NULL. So we can't use the trick of having a single function. Move to two functions one for each value and the tests are fixed. Fixes: b804b35b1c8a0edfd127ac20819c234be55ac7fc migration: Create mi

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Juan Quintela
Kevin Wolf wrote: > Am 03.05.2023 um 16:53 hat Juan Quintela geschrieben: >> Kevin Wolf wrote: >> > Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: >> >> Notice that we changed the test of ->has_block_bitmap_mapping >> >> for the test that block_bitmap_mapping is not NULL. >> >> >> >> Sign

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Juan Quintela
Kevin Wolf wrote: > Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: >> Notice that we changed the test of ->has_block_bitmap_mapping >> for the test that block_bitmap_mapping is not NULL. >> >> Signed-off-by: Juan Quintela >> Reviewed-by: Vladimir Sementsov-Ogievskiy >> >> --- >> >> Mak

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Kevin Wolf
Am 03.05.2023 um 16:53 hat Juan Quintela geschrieben: > Kevin Wolf wrote: > > Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: > >> Notice that we changed the test of ->has_block_bitmap_mapping > >> for the test that block_bitmap_mapping is not NULL. > >> > >> Signed-off-by: Juan Quintela >

[PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path

2023-05-03 Thread Kevin Wolf
Socket paths need to be short to avoid failures. This is why there is a iotests.sock_dir (defaulting to /tmp) separate from the disk image base directory. Make use of it to fix failures in too deeply nested test directories. Fixes: ab7f7e67a7e7b49964109501dfcde4ec29bae60e Signed-off-by: Kevin Wol

Re: [PATCH] block: Fix use after free in blockdev_mark_auto_del()

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 04:01:42PM +0200, Kevin Wolf wrote: > job_cancel_locked() drops the job list lock temporarily and it may call > aio_poll(). We must assume that the list has changed after this call. > Also, with unlucky timing, it can end up freeing the job during > job_completed_txn_abort_l

Re: [PATCH] block/export: call blk_set_dev_ops(blk, NULL, NULL)

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 10:43:16AM -0500, Eric Blake wrote: > On Tue, May 02, 2023 at 05:11:19PM -0400, Stefan Hajnoczi wrote: > > Most export types install BlockDeviceOps pointers. It is easy to forget > > to remove them because that happens automatically via the "drive" qdev > > property in hw/ b

Re: [PATCH] block/blkio: add 'fd' option to virtio-blk-vhost-vdpa driver

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 11:15:56AM +0200, Stefano Garzarella wrote: > On Tue, May 02, 2023 at 03:02:32PM -0400, Stefan Hajnoczi wrote: > > On Tue, May 02, 2023 at 04:50:50PM +0200, Stefano Garzarella wrote: > > > The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the new > > > 'fd' propert

Re: [PATCH] block/export: call blk_set_dev_ops(blk, NULL, NULL)

2023-05-03 Thread Eric Blake
On Tue, May 02, 2023 at 05:11:19PM -0400, Stefan Hajnoczi wrote: > Most export types install BlockDeviceOps pointers. It is easy to forget > to remove them because that happens automatically via the "drive" qdev > property in hw/ but not block/export/. > > Put blk_set_dev_ops(blk, NULL, NULL) call

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Juan Quintela
Kevin Wolf wrote: > Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: >> Notice that we changed the test of ->has_block_bitmap_mapping >> for the test that block_bitmap_mapping is not NULL. >> >> Signed-off-by: Juan Quintela >> Reviewed-by: Vladimir Sementsov-Ogievskiy >> >> --- >> >> Mak

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Kevin Wolf
Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: > Notice that we changed the test of ->has_block_bitmap_mapping > for the test that block_bitmap_mapping is not NULL. > > Signed-off-by: Juan Quintela > Reviewed-by: Vladimir Sementsov-Ogievskiy > > --- > > Make it return const (vladimir)

[PATCH] block: Fix use after free in blockdev_mark_auto_del()

2023-05-03 Thread Kevin Wolf
job_cancel_locked() drops the job list lock temporarily and it may call aio_poll(). We must assume that the list has changed after this call. Also, with unlucky timing, it can end up freeing the job during job_completed_txn_abort_locked(), making the job pointer invalid, too. For both reasons, we

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-03 Thread Kevin Wolf
Am 03.05.2023 um 15:11 hat Stefan Hajnoczi geschrieben: > On Wed, May 03, 2023 at 10:08:46AM +0200, Kevin Wolf wrote: > > Am 02.05.2023 um 22:06 hat Stefan Hajnoczi geschrieben: > > > On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote: > > > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi gesc

Re: [PATCH v4 03/20] virtio-scsi: avoid race between unplug and transport event

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 10:00:57AM +0200, Kevin Wolf wrote: > Am 02.05.2023 um 20:56 hat Stefan Hajnoczi geschrieben: > > On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote: > > > Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben: > > > > Only report a transport reset event to the gues

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 10:08:46AM +0200, Kevin Wolf wrote: > Am 02.05.2023 um 22:06 hat Stefan Hajnoczi geschrieben: > > On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote: > > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > > > vhost-user activity must be suspended during bd

Re: [PATCH v4 04/20] virtio-scsi: stop using aio_disable_external() during unplug

2023-05-03 Thread Stefan Hajnoczi
On Wed, May 03, 2023 at 01:40:49PM +0200, Kevin Wolf wrote: > Am 02.05.2023 um 22:02 hat Stefan Hajnoczi geschrieben: > > On Tue, May 02, 2023 at 03:19:52PM +0200, Kevin Wolf wrote: > > > Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben: > > > > On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin

Re: [PATCH v4 04/20] virtio-scsi: stop using aio_disable_external() during unplug

2023-05-03 Thread Kevin Wolf
Am 02.05.2023 um 22:02 hat Stefan Hajnoczi geschrieben: > On Tue, May 02, 2023 at 03:19:52PM +0200, Kevin Wolf wrote: > > Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben: > > > On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin Wolf wrote: > > > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi gesc

Re: [PATCH] block/blkio: add 'fd' option to virtio-blk-vhost-vdpa driver

2023-05-03 Thread Stefano Garzarella
On Tue, May 02, 2023 at 03:02:32PM -0400, Stefan Hajnoczi wrote: On Tue, May 02, 2023 at 04:50:50PM +0200, Stefano Garzarella wrote: The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the new 'fd' property. Let's expose this to the user, so the management layer can pass the file descrip

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-03 Thread Kevin Wolf
Am 02.05.2023 um 22:06 hat Stefan Hajnoczi geschrieben: > On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote: > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > > vhost-user activity must be suspended during bdrv_drained_begin/end(). > > > This prevents new requests from interf

Re: [PATCH v4 03/20] virtio-scsi: avoid race between unplug and transport event

2023-05-03 Thread Kevin Wolf
Am 02.05.2023 um 20:56 hat Stefan Hajnoczi geschrieben: > On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote: > > Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben: > > > Only report a transport reset event to the guest after the SCSIDevice > > > has been unrealized by qdev_simple_devi