[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 17/61] qcow2: Remove unused Error variable in do_perf
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 17/61] qcow2: Remove unused Error variable in do_perform_cow() |
Date: |
Fri, 23 Jun 2017 18:21:15 +0200 |
From: Alberto Garcia <address@hidden>
We are using the return value of qcow2_encrypt_sectors() to detect
problems but we are throwing away the returned Error since we have no
way to report it to the user. Therefore we can simply get rid of the
local Error variable and pass NULL instead.
Alternatively we could try to figure out a way to pass the original
error instead of simply returning -EIO, but that would be more
invasive, so let's keep the current approach.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2-cluster.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index d779ea1..d1c419f 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -440,16 +440,14 @@ static int coroutine_fn do_perform_cow(BlockDriverState
*bs,
}
if (bs->encrypted) {
- Error *err = NULL;
int64_t sector = (src_cluster_offset + offset_in_cluster)
>> BDRV_SECTOR_BITS;
assert(s->cipher);
assert((offset_in_cluster & ~BDRV_SECTOR_MASK) == 0);
assert((bytes & ~BDRV_SECTOR_MASK) == 0);
if (qcow2_encrypt_sectors(s, sector, iov.iov_base, iov.iov_base,
- bytes >> BDRV_SECTOR_BITS, true, &err) < 0) {
+ bytes >> BDRV_SECTOR_BITS, true, NULL) < 0) {
ret = -EIO;
- error_free(err);
goto out;
}
}
--
1.8.3.1
- [Qemu-block] [PULL 06/61] migration: avoid recursive AioContext locking in save_vmstate(), (continued)
- [Qemu-block] [PULL 06/61] migration: avoid recursive AioContext locking in save_vmstate(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 07/61] migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 10/61] throttle: Update throttle-groups.c documentation, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 09/61] doc: Document driver-specific -blockdev options, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 08/61] doc: Document generic -blockdev options, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 12/61] migration: hold AioContext lock for loadvm qemu_fclose(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 13/61] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 14/61] qemu-iotests: 068: use -drive/-device instead of -hda, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 15/61] qemu-iotests: 068: test iothread mode, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 17/61] qcow2: Remove unused Error variable in do_perform_cow(),
Kevin Wolf <=
- [Qemu-block] [PULL 18/61] qcow2: Use unsigned int for both members of Qcow2COWRegion, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 20/61] qcow2: Split do_perform_cow() into _read(), _encrypt() and _write(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 16/61] nvme: Add support for Read Data and Write Data in CMBs., Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 19/61] qcow2: Make perform_cow() call do_perform_cow() twice, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 21/61] qcow2: Allow reading both COW regions with only one request, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 22/61] qcow2: Pass a QEMUIOVector to do_perform_cow_{read, write}(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 26/61] qed: Make qed_read_table() synchronous, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 24/61] qcow2: Use offset_into_cluster() and offset_to_l2_index(), Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 25/61] qed: Use bottom half to resume waiting requests, Kevin Wolf, 2017/06/23
- [Qemu-block] [PULL 27/61] qed: Remove callback from qed_read_table(), Kevin Wolf, 2017/06/23