[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/10] block: Fix error path in bdrv_invalidate_cach
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 04/10] block: Fix error path in bdrv_invalidate_cache() |
Date: |
Tue, 22 Dec 2015 17:46:20 +0100 |
We can only clear BDRV_O_INCOMING if the caches were actually
invalidated.
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block.c b/block.c
index 411edbf..554ed64 100644
--- a/block.c
+++ b/block.c
@@ -3273,12 +3273,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 00/10] qcow2: Implement image locking, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 01/10] qcow2: Write feature table only for v3 images, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 03/10] block: Assert no write requests under BDRV_O_INCOMING, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 02/10] qcow2: Write full header on image creation, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 04/10] block: Fix error path in bdrv_invalidate_cache(),
Kevin Wolf <=
- [Qemu-devel] [PATCH 05/10] block: Inactivate BDS when migration completes, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 07/10] qcow2: Implement .bdrv_inactivate, Kevin Wolf, 2015/12/22
- [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images, Kevin Wolf, 2015/12/22