From: Or Ozeri <oro@il.ibm.com>
To: qemu-devel@nongnu.org
Cc: dupadhya@redhat.com, oro@il.ibm.com, to.my.trociny@gmail.com,
qemu-block@nongnu.org, dannyh@il.ibm.com
Subject: [PATCH v1 0/1] virtio-block: switch to blk_get_max_hw_transfer
Date: Thu, 9 Dec 2021 03:28:14 -0600 [thread overview]
Message-ID: <20211209092815.778066-1-oro@il.ibm.com> (raw)
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, do not round to power of 2
The above commit switched posix block device limits (including host /dev/nbdX devices)
to query limits from /sys/dev/block/..., instead of using predefined limits.
The scsi-generic driver was changed to use the queried limits,
whereas the virtio-blk driver was only the queried max_iov,
but still using the predefined max_transfer, which is unlimited in qemu.
For NBD devices, max_iov is unlimited by the kernel nbd driver.
As as consequence, the virtio-blk merged requests over the limit of our host /dev/nbdX device,
which apparently caused the guest disk errors.
The solution that worked for me was to change the virtio-blk driver to use the max_transfer
limit queried from the posix host device (given by blk_get_max_hw_transfer).
Or Ozeri (1):
virtio-block: switch to blk_get_max_hw_transfer
hw/block/virtio-blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.25.1
next reply other threads:[~2021-12-09 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 9:28 Or Ozeri [this message]
2021-12-09 9:28 ` [PATCH v1 1/1] virtio-block: switch to blk_get_max_hw_transfer Or Ozeri
2023-01-12 20:28 ` Ilya Dryomov
2023-01-13 11:44 ` Kevin Wolf
2023-01-30 10:48 ` Or Ozeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211209092815.778066-1-oro@il.ibm.com \
--to=oro@il.ibm.com \
--cc=dannyh@il.ibm.com \
--cc=dupadhya@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=to.my.trociny@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).