[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 06/22] file-posix: Fix has_write_zeroes after NO_FALL
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 06/22] file-posix: Fix has_write_zeroes after NO_FALLBACK |
Date: |
Thu, 12 Sep 2019 15:45:48 +0200 |
If QEMU_AIO_NO_FALLBACK is given, we always return failure and don't
even try to use the BLKZEROOUT ioctl. In this failure case, we shouldn't
disable has_write_zeroes because we didn't learn anything about the
ioctl. The next request might not set QEMU_AIO_NO_FALLBACK and we can
still use the ioctl then.
Fixes: 738301e1175
Reported-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block/file-posix.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index f683a36c8a..f12c06de2d 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1502,12 +1502,12 @@ static ssize_t
handle_aiocb_write_zeroes_block(RawPosixAIOData *aiocb)
} while (errno == EINTR);
ret = translate_err(-errno);
+ if (ret == -ENOTSUP) {
+ s->has_write_zeroes = false;
+ }
}
#endif
- if (ret == -ENOTSUP) {
- s->has_write_zeroes = false;
- }
return ret;
}
--
2.20.1
- [Qemu-block] [PULL 00/22] Block layer patches, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 01/22] qcow2: Fix the calculation of the maximum L2 cache size, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 03/22] block/file-posix: Reduce xfsctl() use, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 02/22] job: drop job_drain, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 04/22] iotests: Test reverse sub-cluster qcow2 writes, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 05/22] pr-manager: Fix invalid g_free() crash bug, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 07/22] vpc: Return 0 from vpc_co_create() on success, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 06/22] file-posix: Fix has_write_zeroes after NO_FALLBACK,
Kevin Wolf <=
- [Qemu-block] [PULL 08/22] iotests: Add supported protocols to execute_test(), Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 10/22] iotests: Restrict nbd Python tests to nbd, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 09/22] iotests: Restrict file Python tests to file, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 11/22] iotests: Test blockdev-create for vpc, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 12/22] iotests: skip 232 when run tests as root, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 13/22] block/nfs: add support for nfs_umount, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 15/22] iotests: exclude killed processes from running under Valgrind, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 16/22] iotests: Add casenotrun report to bash tests, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 14/22] iotests: allow Valgrind checking all QEMU processes, Kevin Wolf, 2019/09/12
- [Qemu-block] [PULL 17/22] iotests: Valgrind fails with nonexistent directory, Kevin Wolf, 2019/09/12