[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 4/9] block: Fix error path in bdrv_invalidate_cac
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH v2 4/9] block: Fix error path in bdrv_invalidate_cache() |
Date: |
Wed, 13 Jan 2016 17:37:11 +0100 |
We can only clear BDRV_O_INCOMING if the caches were actually
invalidated.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index ef37d51..ee9d7ea 100644
--- a/block.c
+++ b/block.c
@@ -3276,12 +3276,14 @@ void bdrv_invalidate_cache(BlockDriverState *bs, Error
**errp)
bdrv_invalidate_cache(bs->file->bs, &local_err);
}
if (local_err) {
+ bs->open_flags |= BDRV_O_INCOMING;
error_propagate(errp, local_err);
return;
}
ret = refresh_total_sectors(bs, bs->total_sectors);
if (ret < 0) {
+ bs->open_flags |= BDRV_O_INCOMING;
error_setg_errno(errp, -ret, "Could not refresh total sector count");
return;
}
--
1.8.3.1
- [Qemu-devel] [PATCH v2 0/9] block/qcow2: Migration handoff fixes and cleanups, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 1/9] qcow2: Write feature table only for v3 images, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 3/9] block: Assert no write requests under BDRV_O_INCOMING, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 2/9] qcow2: Write full header on image creation, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 4/9] block: Fix error path in bdrv_invalidate_cache(),
Kevin Wolf <=
- [Qemu-devel] [PATCH v2 6/9] block: Inactivate BDS when migration completes, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 7/9] qcow2: Implement .bdrv_inactivate, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 8/9] qcow2: Fix BDRV_O_INACTIVE handling in qcow2_invalidate_cache(), Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 5/9] block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE, Kevin Wolf, 2016/01/13
- [Qemu-devel] [PATCH v2 9/9] qcow2: Make image inaccessible after failed qcow2_invalidate_cache(), Kevin Wolf, 2016/01/13
- Re: [Qemu-devel] [PATCH v2 0/9] block/qcow2: Migration handoff fixes and cleanups, Kevin Wolf, 2016/01/19