[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/31] qcow2: Fix error cases to run depedent reques
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 03/31] qcow2: Fix error cases to run depedent requests |
Date: |
Tue, 6 Sep 2011 17:39:18 +0200 |
Requests depending on a failed request would end up waiting forever. This fixes
the error path to continue dependent requests even when the request has failed.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f26f7b6..8aed310 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -593,13 +593,12 @@ static int qcow2_co_writev(BlockDriverState *bs,
}
ret = qcow2_alloc_cluster_link_l2(bs, &l2meta);
-
- run_dependent_requests(s, &l2meta);
-
if (ret < 0) {
goto fail;
}
+ run_dependent_requests(s, &l2meta);
+
remaining_sectors -= cur_nr_sectors;
sector_num += cur_nr_sectors;
bytes_done += cur_nr_sectors * 512;
@@ -607,6 +606,8 @@ static int qcow2_co_writev(BlockDriverState *bs,
ret = 0;
fail:
+ run_dependent_requests(s, &l2meta);
+
qemu_co_mutex_unlock(&s->lock);
qemu_iovec_destroy(&hd_qiov);
--
1.7.6
- [Qemu-devel] [PULL 00/31] Block patches, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 02/31] qcow2: Properly initialise QcowL2Meta, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 04/31] async: Allow nested qemu_bh_poll calls, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 01/31] linux aio: some comments, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 03/31] qcow2: Fix error cases to run depedent requests,
Kevin Wolf <=
- [Qemu-devel] [PATCH 05/31] block: Attach non-qdev devices as well, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 06/31] block: Generalize change_cb() to BlockDevOps, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 08/31] ide: Update command code definitions as per ACS-2 Table B.2, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 07/31] block: Split change_cb() into change_media_cb(), resize_cb(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 09/31] ide: Clean up case label indentation in ide_exec_cmd(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 11/31] block/raw: Fix to forward method bdrv_media_changed(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 10/31] ide: Give vmstate structs internal linkage where possible, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 17/31] spitz tosa: Simplify "drive is suitable for microdrive" test, Kevin Wolf, 2011/09/06