[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] support add-cow format

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] support add-cow format
Date: Fri, 23 Sep 2011 15:49:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/23/2011 02:20 PM, Kevin Wolf wrote:
+static BlockDriverAIOCB *add_cow_aio_flush(BlockDriverState *bs,
+        BlockDriverCompletionFunc *cb, void *opaque)
+    BDRVAddCowState *state = bs->opaque;
+    bdrv_aio_flush(state->image_hd, cb, opaque);
+    return bdrv_aio_flush(bs->file, cb, opaque);

This will invoke the callback twice, and opaque will probably be invalid
after the first callback. Not good.

This code is also lacking error handling for the ifrst bdrv_aio_flush.

I'll repost the NBD series today, so that Dong Xu Wang can implement this as co_flush.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]