[PATCH v1 0/1] virtio-block: switch to blk_get_max_hw_transfer

2021-12-09 Thread Or Ozeri
Since moving to qemu 6.1.0 we've been seeing disk failures inside a qemu guest VM. This happened when using if=virtio on a host /dev/nbdX device. Binary searching on qemu commit history, I found these errors start on this commit: Commit 18473467 file-posix: try BLKSECTGET on block devices too, d

[PATCH v1 1/1] virtio-block: switch to blk_get_max_hw_transfer

2021-12-09 Thread Or Ozeri
The blk_get_max_hw_transfer API was recently added in 6.1.0. It allows querying an underlying block device its max transfer capability. This commit changes virtio-blk to use this. Signed-off-by: Or Ozeri --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 0/6] aio-posix: split poll check from ready handler

2021-12-09 Thread Stefano Garzarella
On Tue, Dec 07, 2021 at 01:23:30PM +, Stefan Hajnoczi wrote: v3: - Fixed FUSE export aio_set_fd_handler() call that I missed and double-checked for any other missing call sites using Coccinelle [Rich] v2: - Cleaned up unused return values in nvme and virtio-blk [Stefano] - Documented try_pol

[RFC] block-backend: prevent dangling BDS pointer in blk_drain()

2021-12-09 Thread Stefan Hajnoczi
The BlockBackend root child can change during bdrv_drained_begin() when aio_poll() is invoked. In fact the BlockDriverState can reach refcnt 0 and blk_drain() is left with a dangling BDS pointer. One example is scsi_device_purge_requests(), which calls blk_drain() to wait for in-flight requests to

Re: [PATCH 0/3] iotests: multiprocessing!!

2021-12-09 Thread Hanna Reitz
On 03.12.21 13:22, Vladimir Sementsov-Ogievskiy wrote: Hi all! Finally, I can not stand it any longer. So, I'm happy to present multiprocessing support for iotests test runner. Thanks, looks great! Applied to my block-next branch: https://gitlab.com/hreitz/qemu/-/commits/block-next Hanna

Re: [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.

2021-12-09 Thread Ani Sinha
On Thu, Dec 2, 2021 at 10:34 PM Mark Mielke wrote: > > Sorry... I missed copy maintainers and qemu-stable. This should be > considered a regression. > > -- Forwarded message - > From: Mark Mielke > Date: Thu, Dec 2, 2021 at 11:26 AM > Subject: [PATCH] virtio-blk: Fix clean up of h

[PULL 0/1] Block patches

2021-12-09 Thread Stefan Hajnoczi
The following changes since commit a3607def89f9cd68c1b994e1030527df33aa91d0: Update version for v6.2.0-rc4 release (2021-12-07 17:51:38 -0800) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to cf4fbc3030c974ff

[PATCH] vvfat: Fix size of temporary qcow file

2021-12-09 Thread Kevin Wolf
The size of the qcow size was calculated so that only the FAT partition would fit on it, but not the whole disk. However, offsets relative to the whole disk are used to access it, so increase its size to be large enough for that. Signed-off-by: Kevin Wolf --- block/vvfat.c | 7 +++ 1 file ch

[PULL 1/1] block/nvme: fix infinite loop in nvme_free_req_queue_cb()

2021-12-09 Thread Stefan Hajnoczi
When the request free list is exhausted the coroutine waits on q->free_req_queue for the next free request. Whenever a request is completed a BH is scheduled to invoke nvme_free_req_queue_cb() and wake up waiting coroutines. 1. nvme_get_free_req() waits for a free request: while (q->free_req_

[PATCH] vvfat: Fix vvfat_write() for writes before the root directory

2021-12-09 Thread Kevin Wolf
The calculation in sector2cluster() is done relative to the offset of the root directory. Any writes to blocks before the start of the root directory (in particular, writes to the FAT) result in negative values, which are not handled correctly in vvfat_write(). This changes sector2cluster() to ret

Re: [RFC] block-backend: prevent dangling BDS pointer in blk_drain()

2021-12-09 Thread Hanna Reitz
On 09.12.21 15:23, Stefan Hajnoczi wrote: The BlockBackend root child can change during bdrv_drained_begin() when aio_poll() is invoked. In fact the BlockDriverState can reach refcnt 0 and blk_drain() is left with a dangling BDS pointer. One example is scsi_device_purge_requests(), which calls b

Re: [PULL 0/1] Block patches

2021-12-09 Thread Peter Maydell
On Thu, 9 Dec 2021 at 15:21, Stefan Hajnoczi wrote: > > The following changes since commit a3607def89f9cd68c1b994e1030527df33aa91d0: > > Update version for v6.2.0-rc4 release (2021-12-07 17:51:38 -0800) > > are available in the Git repository at: > > https://gitlab.com/stefanha/qemu.git tags/b

Re: [RFC] block-backend: prevent dangling BDS pointer in blk_drain()

2021-12-09 Thread Vladimir Sementsov-Ogievskiy
09.12.2021 18:45, Hanna Reitz wrote: On 09.12.21 15:23, Stefan Hajnoczi wrote: The BlockBackend root child can change during bdrv_drained_begin() when aio_poll() is invoked. In fact the BlockDriverState can reach refcnt 0 and blk_drain() is left with a dangling BDS pointer. One example is scsi_

Re: [RFC] block-backend: prevent dangling BDS pointer in blk_drain()

2021-12-09 Thread Stefan Hajnoczi
On Thu, Dec 09, 2021 at 04:45:13PM +0100, Hanna Reitz wrote: > On 09.12.21 15:23, Stefan Hajnoczi wrote: > > The BlockBackend root child can change during bdrv_drained_begin() when > > aio_poll() is invoked. In fact the BlockDriverState can reach refcnt 0 > > and blk_drain() is left with a dangling

Re: [PATCH] mirror: Avoid assertion failed in mirror_run

2021-12-09 Thread Vladimir Sementsov-Ogievskiy
08.12.2021 12:52, wang.y...@zte.com.cn wrote: [CC-ing qemu-block, Vladimir, Kevin, and John – when sending patches, please look into the MAINTAINERS file or use the scripts/get_maintainer.pl script to find out who to CC on them. It’s very to overlook patches on qemu-devel :/] On 07.12.21 11:56,

Re: [PULL 0/1] Block patches

2021-12-09 Thread Stefan Hajnoczi
On Thu, Dec 09, 2021 at 03:46:29PM +, Peter Maydell wrote: > On Thu, 9 Dec 2021 at 15:21, Stefan Hajnoczi wrote: > > > > The following changes since commit a3607def89f9cd68c1b994e1030527df33aa91d0: > > > > Update version for v6.2.0-rc4 release (2021-12-07 17:51:38 -0800) > > > > are availabl

Re: [RFC] block-backend: prevent dangling BDS pointer in blk_drain()

2021-12-09 Thread Vladimir Sementsov-Ogievskiy
09.12.2021 19:32, Stefan Hajnoczi wrote: On Thu, Dec 09, 2021 at 04:45:13PM +0100, Hanna Reitz wrote: On 09.12.21 15:23, Stefan Hajnoczi wrote: The BlockBackend root child can change during bdrv_drained_begin() when aio_poll() is invoked. In fact the BlockDriverState can reach refcnt 0 and blk_

Re: [PULL 0/1] Block patches

2021-12-09 Thread Richard Henderson
On 12/9/21 8:34 AM, Stefan Hajnoczi wrote: I'm not running the release cycle this time around, but: it's already rc4, pull requests by this point need a clear justification in the cover letter for why they're really release critical. It's late, this isn't a show-stopper (block/nvme.c is not wid

Re: [PATCH 3/4] Move CONFIG_XFS handling to meson.build

2021-12-09 Thread Thomas Huth
On 02/11/2021 12.34, Paolo Bonzini wrote: On 28/10/21 20:59, Thomas Huth wrote: Checking for xfsctl() can be done more easily in meson.build. Also, this is not a "real" feature like the other features that we provide with the "--enable-xxx" and "--disable-xxx" switches for the configure script,