mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:56:38 +00:00
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging
Pull request # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmomwr8ACgkQnKSrs4Gr # c8h9fAgAh5ZV9EY3ooqwInsm1q4fylTj2qHo0nDJuZpjtQlRGGV4tfDkxUGSFfCh # UtzRuh7kdExvoiV4MR0kerHBYt78jClbBoiJRW8i0iIh3jW1zLJBcXm4yJAshmFf # 711vr88517k9a/UnJGDxN1e22mahs3KvYLJDOZeZDN2dPm8B5Y6M/bocxDzZrm+t # YVYoqxiMRkGK2Gypv/LkkjQLsQ7nFJq0GG9hUEJccZUWg1BqJ/qOvI0HSMUWwe+/ # mBq9SuysHxMa+V6xN0S/uaSGs5zLjrxkYDNIP9aKh3Z1X5Gy/SmAHzPCE5IMxsDI # Gy4Zs1Au0hozL0oPiJN2VLMDqZiPIQ== # =HmL0 # -----END PGP SIGNATURE----- # gpg: Signature made Mon 08 Jun 2026 09:25:19 EDT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [ultimate] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [ultimate] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu: MAINTAINERS: remove Julia Suvorova from Linux io_uring block/io: fallback to bounce buffer if BLKZEROOUT is not supported because of alignment Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
@@ -4346,7 +4346,6 @@ F: block/file-win32.c
|
||||
F: block/win32-aio.c
|
||||
|
||||
Linux io_uring
|
||||
M: Julia Suvorova <jusual@redhat.com>
|
||||
M: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
R: Stefano Garzarella <sgarzare@redhat.com>
|
||||
L: qemu-block@nongnu.org
|
||||
|
||||
13
block/io.c
13
block/io.c
@@ -1918,7 +1918,18 @@ bdrv_co_do_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes,
|
||||
assert(!bs->supported_zero_flags);
|
||||
}
|
||||
|
||||
if (ret == -ENOTSUP && !(flags & BDRV_REQ_NO_FALLBACK)) {
|
||||
/*
|
||||
* TODO The ret == -EINVAL && num < alignment case is a workaround for
|
||||
* when request_alignment is 1 on files with cache=writeback. The Linux
|
||||
* ioctl(BLKZEROOUT) requires block alignment and will fail with
|
||||
* EINVAL. The block layer should align the request to
|
||||
* write_zeroes_alignment instead of trying the syscall, failing, and
|
||||
* falling back to a bounce buffer. Doing that is not easy so for now
|
||||
* we use a bounce buffer:
|
||||
* https://lore.kernel.org/qemu-devel/20260109120837.2772961-1-f.ebner@proxmox.com/
|
||||
*/
|
||||
if ((ret == -ENOTSUP || (ret == -EINVAL && num < alignment)) &&
|
||||
!(flags & BDRV_REQ_NO_FALLBACK)) {
|
||||
/* Fall back to bounce buffer if write zeroes is unsupported */
|
||||
BdrvRequestFlags write_flags = flags & ~BDRV_REQ_ZERO_WRITE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user