[PULL 05/13] io: follow coroutine AioContext in qio_channel_yield()

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi The ongoing QEMU multi-queue block layer effort makes it possible for multiple threads to process I/O in parallel. The nbd block driver is not compatible with the multi-queue block layer yet because QIOChannel cannot be used easily from coroutines running in multiple threads

[PULL 07/13] qemu-nbd: improve error message for dup2 error

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" This error happens if we are not able to close the pipe to the parent (to trace errors in the child process) and assign stderr to /dev/null as required by the daemonizing convention. Signed-off-by: Denis V. Lunev Suggested-by: Eric Blake CC: Eric Blake CC: Vladimir Seme

[PULL 11/13] qemu-nbd: invent nbd_client_release_pipe() helper

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Move the code from main() and nbd_client_thread() into the specific helper. This code is going to be grown. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-6-...@openvz.org> Reviewed-by: Eric Blake Signed

[PULL 02/13] nbd: drop unused nbd_receive_negotiate() aio_context argument

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230830224802.493686-2-stefa...@redhat.com> Signed-off-by: Eric Blake --- include/block/nbd.h

[PULL 13/13] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-8-...@openvz.org> Reviewed-by: Eric Blake [eblake: Wording improvement] Signed-off-by: Eric Blake --- docs/tools/qemu-nbd.rst | 4 +++- 1 file changed, 3 i

[PULL 10/13] qemu-nbd: put saddr into into struct NbdClientOpts

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-5-...@openvz.org> Reviewed-by: Eric Blake Signed-o

[PULL 01/13] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Eric Blake
From: Andrey Drobyshev In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add testcase for CoR with subclusters") we've introduced a new testcase for copy-on-read with subclusters. Test 197 always forces qcow2 as the top image, but allows backing image to be in any format. That last t

[PULL 12/13] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" Closing stderr earlier is good for daemonized qemu-nbd under ssh earlier, but breaks the case where -v is being used to track what is happening in the server, as in iotest 233. When we know we are verbose, we should preserve original stderr and restore it once the setup st

[PULL 03/13] nbd: drop unused nbd_start_negotiate() aio_context argument

2023-09-07 Thread Eric Blake
From: Stefan Hajnoczi aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230830224802.493686-3-stefa...@redhat.com> Signed-off-by: Eric Blake --- nbd/client.c | 11 +++

[PULL 09/13] qemu-nbd: move srcpath into struct NbdClientOpts

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" We pass other parameters into nbd_client_thread() in this way. This patch makes the code more consistent. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-4-...@openvz.org> Reviewed-by: Eric Blake [eblake:

[PULL 08/13] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined

2023-09-07 Thread Eric Blake
From: "Denis V. Lunev" This patch also drops definition of some locals in main() to avoid useless data copy. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy Message-ID: <20230906093210.339585-3-...@openvz.org> Reviewed-by: Eric Blake Signed-off-by: Eric Blake -

Re: [PATCH v2 4/3] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Eric Blake
On Fri, Sep 08, 2023 at 01:07:18AM +0300, Andrey Drobyshev via wrote: > In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add > testcase for CoR with subclusters") we've introduced a new testcase for > copy-on-read with subclusters. Test 197 always forces qcow2 as the top > image, but a

Re: [PATCH 8/8] qemu-nbd: fix formatting in main()

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:10AM +0200, Denis V. Lunev wrote: > Just a formatting, no functional changes. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > Do not really sure that this patch is mandatory, just stabs my eye. Feel free > to drop if th

Re: [PATCH v2 3/3] tests/qemu-iotests/197: add testcase for CoR with subclusters

2023-09-07 Thread Andrey Drobyshev
On 9/6/23 12:43, Denis V. Lunev wrote: > On 7/11/23 19:25, Andrey Drobyshev wrote: >> Add testcase which checks that allocations during copy-on-read are >> performed on the subcluster basis when subclusters are enabled in target >> image. >> >> This testcase also triggers the following assert with

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-09-07 Thread Denis V. Lunev
On 9/7/23 22:11, Michael Tokarev wrote: 11.07.2023 20:25, Andrey Drobyshev via wrote: v1 --> v2:   * Fixed line indentation;   * Fixed wording in a comment;   * Added R-b. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html Andrey Drobyshev (3):    block: add subcluste

[PATCH v2 4/3] qemu-iotests/197: use more generic commands for formats other than qcow2

2023-09-07 Thread Andrey Drobyshev via
In the previous commit e2f938265e0 ("tests/qemu-iotests/197: add testcase for CoR with subclusters") we've introduced a new testcase for copy-on-read with subclusters. Test 197 always forces qcow2 as the top image, but allows backing image to be in any format. That last test case didn't meet thes

Re: [PATCH 7/8] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Denis V. Lunev
On 9/8/23 00:01, Eric Blake wrote: On Wed, Sep 06, 2023 at 11:32:09AM +0200, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- docs/tools/qemu-nbd.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tools/qem

Re: [PATCH 7/8] qemu-nbd: document -v behavior in respect to --fork in man

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:09AM +0200, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > docs/tools/qemu-nbd.rst | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/docs/tools/qemu-nbd.rst b/docs/tools/q

Re: [PATCH 6/8] qemu-nbd: Restore "qemu-nbd -v --fork" output

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:08AM +0200, Denis V. Lunev wrote: > Closing stderr earlier is good for daemonized qemu-nbd under ssh > earlier, but breaks the case where -v is being used to track what is > happening in the server, as in iotest 233. > > When we know we are verbose, we should preserve

Re: [PATCH 5/8] qemu-nbd: invent nbd_client_release_pipe() helper

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:07AM +0200, Denis V. Lunev wrote: > Move the code from main() and nbd_client_thread() into the specific > helper. This code is going to be grown. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 23

[PATCH 1/1] block: improve alignment detection and fix 271 test

2023-09-07 Thread Denis V. Lunev
Unfortunately 271 IO test is broken if started in non-cached mode. Commits commit a6b257a08e3d72219f03e461a52152672fec0612 Author: Nir Soffer Date: Tue Aug 13 21:21:03 2019 +0300 file-posix: Handle undetectable alignment and commit 9c60a5d1978e6dcf85c0e01b50e6f7f54ca09104

Re: [PATCH 4/8] qemu-nbd: put saddr into into struct NbdClientOpts

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:06AM +0200, Denis V. Lunev wrote: > We pass other parameters into nbd_client_thread() in this way. This patch > makes the code more consistent. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 13 +++---

Re: [PATCH 3/8] qemu-nbd: move srcpath into struct NbdClientOpts

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:05AM +0200, Denis V. Lunev wrote: > We pass other parameters into nbd_client_thread() in this way. This patch > makes the code more consistent. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 17 +-

Re: [PATCH 2/8] qemu-nbd: define struct NbdClientOpts when HAVE_NBD_DEVICE is not defined

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:04AM +0200, Denis V. Lunev wrote: > This patch also drops definition of some locals in main() to avoid > useless data copy. > > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC: Vladimir Sementsov-Ogievskiy > --- > qemu-nbd.c | 60 --

[PATCH v3 0/2] qemu-img: map: implement support for compressed clusters

2023-09-07 Thread Andrey Drobyshev via
v2 --> v3: * Make "compressed" field mandatory, not optional; * Adjust field description in qapi/block-core.json; * Squash patch 3 into patch 2 so that failing tests don't break bisect; * Update even more tests' outputs now that the field is mandatory. v2: https://lists.nongnu.org/archive/

[PATCH v3 1/2] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-09-07 Thread Andrey Drobyshev via
Functions qcow2_get_host_offset(), get_cluster_offset(), vmdk_co_block_status() explicitly report compressed cluster types when data is compressed. However, this information is never passed further. Let's make use of it by adding new BDRV_BLOCK_COMPRESSED flag for bdrv_block_status(), so that cal

Re: [PATCH 1/8] qemu-nbd: improve error message for dup2 error

2023-09-07 Thread Eric Blake
On Wed, Sep 06, 2023 at 11:32:03AM +0200, Denis V. Lunev wrote: > This error is happened when we are not able to close the pipe to the s/is happened when/happens if/ > parent (to trace errors in the child process) and assign stderr to > /dev/null as required by the daemonizing convention. > > Si

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-09-07 Thread Michael Tokarev
11.07.2023 20:25, Andrey Drobyshev via wrote: v1 --> v2: * Fixed line indentation; * Fixed wording in a comment; * Added R-b. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html Andrey Drobyshev (3): block: add subcluster_size field to BlockDriverInfo block/io

Re: [PATCH 0/2] virtio: Drop out of coroutine context in virtio_load()

2023-09-07 Thread Stefan Hajnoczi
On Tue, Sep 05, 2023 at 04:50:00PM +0200, Kevin Wolf wrote: > This fixes a recently introduced assertion failure that was reported to > happen when migrating virtio-net with a failover. The latent bug that > we're executing code in coroutine context that was never supposed to run > there has existe

Re: [PATCH 2/2] virtio: Drop out of coroutine context in virtio_load()

2023-09-07 Thread Stefan Hajnoczi
On Tue, Sep 05, 2023 at 04:50:02PM +0200, Kevin Wolf wrote: > virtio_load() as a whole should run in coroutine context because it > reads from the migration stream and we don't want this to block. Is that "should" a "must" or a "can"? If it's a "must" then virtio_load() needs assert(qemu_in_corou

[PULL 4/5] hw/ufs: Support for UFS logical unit

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi Message-id: beacc504376ab6a14b1a3830bb3

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Michael Tokarev
07.09.2023 19:54, John Snow wrote: .. > > > Niklas Cassel (7): >    hw/ide/core: set ERR_STAT in unsupported command completion >    hw/ide/ahci: write D2H FIS when processing NCQ command >    hw/ide/ah

[PULL 2/5] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI device. Patches to hand

[PULL 1/5] iothread: Set the GSource "name" field

2023-09-07 Thread Stefan Hajnoczi
From: Fabiano Rosas Having a name in the source helps with debugging core dumps when one might not have access to TLS data to cross-reference AioContexts with their addresses. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Message-id: 20230905180359.14083-1-faro...@suse.de Si

[PULL 5/5] tests/qtest: Introduce tests for UFS

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This patch includes the following tests Test mmio read Test ufs device initialization and ufs-lu recognition Test I/O (Performs a write followed by a read to verify) Signed-off-by: Jeuk Kim Acked-by: Thomas Huth Reviewed-by: Stefan Hajnoczi Message-id: 9e9207f54505e9ba30

[PULL 3/5] hw/ufs: Support for Query Transfer Requests

2023-09-07 Thread Stefan Hajnoczi
From: Jeuk Kim This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request. Signed-off-by: Jeuk Kim Reviewed-by: Stefan Hajnoczi Message-id: ff7a5f0fd26761936a553ffb89d3df0ba62844e9.16939

[PULL 0/5] Block patches

2023-09-07 Thread Stefan Hajnoczi
The following changes since commit 03a3a62fbd0aa5227e978eef3c67d3978aec9e5f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-09-07 10:29:06 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to

Re: [PATCH v10 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-09-07 Thread Stefan Hajnoczi
On Wed, 6 Sept 2023 at 03:45, Jeuk Kim wrote: > > Since v9: > - Added the "UFS_" prefix to all define and enum defined in block/ufs.h. > This fixes > https://gitlab.com/qemu-project/qemu/-/jobs/4977255992 > which is a win32 build error. > > - Fixed not to use pointer type casting (uint32_t * -> un

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread John Snow
On Thu, Sep 7, 2023, 12:49 PM Michael Tokarev wrote: > 07.09.2023 06:42, John Snow wrote: > > > > > IDE Pull request > > > > > > > > Niklas Cassel (7): > >hw/ide/c

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Michael Tokarev
07.09.2023 06:42, John Snow wrote: IDE Pull request Niklas Cassel (7): hw/ide/core: set ERR_STAT in unsupported command completion hw/ide/ahci: write D2H FIS

Re: [PULL 00/18] Parallels format driver

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL for-6.2 0/7] Ide patches

2023-09-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/14] Block patches

2023-09-07 Thread Hanna Czenczek
On 06.09.23 15:18, Stefan Hajnoczi wrote: On Fri, 1 Sept 2023 at 04:18, Hanna Czenczek wrote: The following changes since commit f5fe7c17ac4e309e47e78f0f9761aebc8d2f2c81: Merge tag 'pull-tcg-20230823-2' of https://gitlab.com/rth7680/qemu into staging (2023-08-28 16:07:04 -0400) are availa

Re: [PULL 00/14] Block layer patches

2023-09-07 Thread Kevin Wolf
Am 06.09.2023 um 17:13 hat Stefan Hajnoczi geschrieben: > test-bdrv-drain is failing. I think my coroutine wrapper patch might > be necessary: > https://gitlab.com/qemu-project/qemu/-/jobs/5029372308#L4907 > > I have dropped this patch series for the time being. Feel free to > remove my patches an