[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 07/10] qcow2: Improve error handling in update_r
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 07/10] qcow2: Improve error handling in update_refcount |
Date: |
Tue, 19 Jan 2010 19:51:28 +0100 |
User-agent: |
Mutt/1.3.28i |
On Mon, Jan 18, 2010 at 01:11:33PM +0100, Kevin Wolf wrote:
> If update_refcount fails, try to undo any changes made so far to avoid
> inconsistencies in the image file.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/qcow2-refcount.c | 32 +++++++++++++++++++++++++-------
> 1 files changed, 25 insertions(+), 7 deletions(-)
>
> + /*
> + * Try do undo any updates if an error is returned (This may succeed in
> + * some cases like ENOSPC for allocating a new refcount block)
> + */
> + if (ret < 0) {
> + int dummy;
> + dummy = update_refcount(bs, offset, cluster_offset - offset,
> -addend);
So we recursively call into update_refcount here. What happens an error
causes all updates to fail?
- Re: [Qemu-devel] [PATCH 02/10] qcow2: Fix error handling in qcow_save_vmstate, (continued)
- [Qemu-devel] [PATCH 03/10] qcow2: Return 0/-errno in get_cluster_table, Kevin Wolf, 2010/01/18
- [Qemu-devel] [PATCH 06/10] qcow2: Fix error handling in grow_refcount_table, Kevin Wolf, 2010/01/18
- [Qemu-devel] [PATCH 07/10] qcow2: Improve error handling in update_refcount, Kevin Wolf, 2010/01/18
- Re: [Qemu-devel] [PATCH 07/10] qcow2: Improve error handling in update_refcount,
Christoph Hellwig <=
- [Qemu-devel] [PATCH 05/10] block: Return original error codes in bdrv_pread/write, Kevin Wolf, 2010/01/18
- [Qemu-devel] [PATCH 08/10] qcow2: Allow updating no refcounts, Kevin Wolf, 2010/01/18
- [Qemu-devel] [PATCH 10/10] qcow2: Don't ignore qcow2_alloc_clusters return value, Kevin Wolf, 2010/01/18
- [Qemu-devel] [PATCH 09/10] qcow2: Don't ignore update_refcount return value, Kevin Wolf, 2010/01/18