[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_co
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow() |
Date: |
Tue, 23 May 2017 15:21:49 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 05/23/2017 06:22 AM, Alberto Garcia wrote:
> qcow2_encrypt_sectors() does not need an Error parameter, and we're
> not checking its value anyway, so we can safely remove it.
Misleading. You are NOT removing the Error parameter from
qcow2_encrypt_sectors(), but rather are explicitly ignoring any errors
by passing NULL.
I'd update the commit message to something like:
We are relying on the return value of qcow2_encrypt_sectors() to flag
problems, but have no way to report that error to the end user. Since
we are just throwing away the error, we can pass NULL instead for
simpler code.
A more robust solution would figure out how to pass the original error
(rather than a new message related to our -EIO return) back to the
caller, but that is more invasive.
>
> Signed-off-by: Alberto Garcia <address@hidden>
> ---
> block/qcow2-cluster.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
With a better commit message,
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/23
- [Qemu-devel] [PATCH 2/7] qcow2: Use unsigned int for both members of Qcow2COWRegion, Alberto Garcia, 2017/05/23
- [Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow(), Alberto Garcia, 2017/05/23
- Re: [Qemu-devel] [PATCH 1/7] qcow2: Remove unused Error in do_perform_cow(),
Eric Blake <=
- [Qemu-devel] [PATCH 4/7] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write(), Alberto Garcia, 2017/05/23
- [Qemu-devel] [PATCH 6/7] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}(), Alberto Garcia, 2017/05/23
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Eric Blake, 2017/05/23
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/24
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Anton Nefedov, 2017/05/24
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/24
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Anton Nefedov, 2017/05/24
- Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/25
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW, Alberto Garcia, 2017/05/25