[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 1/6] block: Remove error messages in bdrv_make_zero(
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH 1/6] block: Remove error messages in bdrv_make_zero() |
Date: |
Fri, 22 Mar 2019 14:21:42 +0100 |
There is only a single caller of bdrv_make_zero(), which is qemu-img
convert. If the function fails, we just fall back to a different method
of zeroing out blocks on the target image. There is no good reason to
print error messages on stderr when the higher level operation will
actually succeed.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/io.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/io.c b/block/io.c
index 2ba603c7bc..952372c2bb 100644
--- a/block/io.c
+++ b/block/io.c
@@ -909,8 +909,6 @@ int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
}
ret = bdrv_block_status(bs, offset, bytes, &bytes, NULL, NULL);
if (ret < 0) {
- error_report("error getting block status at offset %" PRId64 ":
%s",
- offset, strerror(-ret));
return ret;
}
if (ret & BDRV_BLOCK_ZERO) {
@@ -919,8 +917,6 @@ int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
}
ret = bdrv_pwrite_zeroes(child, offset, bytes, flags);
if (ret < 0) {
- error_report("error writing zeroes at offset %" PRId64 ": %s",
- offset, strerror(-ret));
return ret;
}
offset += bytes;
--
2.20.1
- [Qemu-block] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 6/6] qemu-io: Add write -n for BDRV_REQ_NO_FALLBACK, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 5/6] qemu-img: Use BDRV_REQ_NO_FALLBACK for pre-zeroing, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 4/6] file-posix: Support BDRV_REQ_NO_FALLBACK for zero writes, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 3/6] block: Advertise BDRV_REQ_NO_FALLBACK in filter drivers, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 2/6] block: Add BDRV_REQ_NO_FALLBACK, Kevin Wolf, 2019/03/22
- [Qemu-block] [PATCH 1/6] block: Remove error messages in bdrv_make_zero(),
Kevin Wolf <=
- Re: [Qemu-block] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert, Eric Blake, 2019/03/22
- Re: [Qemu-block] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert, Nir Soffer, 2019/03/22
- Re: [Qemu-block] [PATCH 0/6] block: Fix slow pre-zeroing in qemu-img convert, Kevin Wolf, 2019/03/25