|
|
8b1478 |
From 8403396f05aa1e54198433409a6db7924eb53969 Mon Sep 17 00:00:00 2001
|
|
|
8b1478 |
From: Maxim Levitsky <mlevitsk@redhat.com>
|
|
|
8b1478 |
Date: Wed, 5 Jun 2019 13:56:57 +0200
|
|
|
8b1478 |
Subject: [PATCH 09/23] block: Remove error messages in bdrv_make_zero()
|
|
|
8b1478 |
|
|
|
8b1478 |
RH-Author: Maxim Levitsky <mlevitsk@redhat.com>
|
|
|
8b1478 |
Message-id: <20190605135705.24526-2-mlevitsk@redhat.com>
|
|
|
8b1478 |
Patchwork-id: 88564
|
|
|
8b1478 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 1/9] block: Remove error messages in bdrv_make_zero()
|
|
|
8b1478 |
Bugzilla: 1648622
|
|
|
8b1478 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
8b1478 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
There is only a single caller of bdrv_make_zero(), which is qemu-img
|
|
|
8b1478 |
convert. If the function fails, we just fall back to a different method
|
|
|
8b1478 |
of zeroing out blocks on the target image. There is no good reason to
|
|
|
8b1478 |
print error messages on stderr when the higher level operation will
|
|
|
8b1478 |
actually succeed.
|
|
|
8b1478 |
|
|
|
8b1478 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
8b1478 |
Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
8b1478 |
|
|
|
8b1478 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1648622
|
|
|
8b1478 |
|
|
|
8b1478 |
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
|
|
|
8b1478 |
(Cherry picked from 48ce986096bb70354b12f0becb253a06bcf9c434)
|
|
|
8b1478 |
|
|
|
8b1478 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
8b1478 |
---
|
|
|
8b1478 |
block/io.c | 4 ----
|
|
|
8b1478 |
1 file changed, 4 deletions(-)
|
|
|
8b1478 |
|
|
|
8b1478 |
diff --git a/block/io.c b/block/io.c
|
|
|
8b1478 |
index 7a99f7b..18bf3c2 100644
|
|
|
8b1478 |
--- a/block/io.c
|
|
|
8b1478 |
+++ b/block/io.c
|
|
|
8b1478 |
@@ -913,8 +913,6 @@ int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
|
|
|
8b1478 |
}
|
|
|
8b1478 |
ret = bdrv_block_status(bs, offset, bytes, &bytes, NULL, NULL);
|
|
|
8b1478 |
if (ret < 0) {
|
|
|
8b1478 |
- error_report("error getting block status at offset %" PRId64 ": %s",
|
|
|
8b1478 |
- offset, strerror(-ret));
|
|
|
8b1478 |
return ret;
|
|
|
8b1478 |
}
|
|
|
8b1478 |
if (ret & BDRV_BLOCK_ZERO) {
|
|
|
8b1478 |
@@ -923,8 +921,6 @@ int bdrv_make_zero(BdrvChild *child, BdrvRequestFlags flags)
|
|
|
8b1478 |
}
|
|
|
8b1478 |
ret = bdrv_pwrite_zeroes(child, offset, bytes, flags);
|
|
|
8b1478 |
if (ret < 0) {
|
|
|
8b1478 |
- error_report("error writing zeroes at offset %" PRId64 ": %s",
|
|
|
8b1478 |
- offset, strerror(-ret));
|
|
|
8b1478 |
return ret;
|
|
|
8b1478 |
}
|
|
|
8b1478 |
offset += bytes;
|
|
|
8b1478 |
--
|
|
|
8b1478 |
1.8.3.1
|
|
|
8b1478 |
|