qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: wdongxu@cn.ibm.com, Dong Xu Wang <wdongxu@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2] support add-cow format
Date: Fri, 23 Sep 2011 15:49:16 +0200	[thread overview]
Message-ID: <4E7C8E5C.90108@redhat.com> (raw)
In-Reply-To: <4E7C7997.2010605@redhat.com>

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.

Paolo

  reply	other threads:[~2011-09-23 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21  8:56 [Qemu-devel] [PATCH v2] support add-cow format Dong Xu Wang
2011-09-23 12:20 ` Kevin Wolf
2011-09-23 13:49   ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-22  1:51 Dong Xu Wang
2011-09-23  7:39 ` Mars.cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E7C8E5C.90108@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=wdongxu@cn.ibm.com \
    --cc=wdongxu@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).