qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate
Date: Fri, 8 Feb 2013 15:51:55 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Feb 08, 2013 at 03:12:57PM +0100, Benoît Canet wrote:
> > > +    iov.iov_len = nb_sectors * BDRV_SECTOR_SIZE;
> > > +    iov.iov_base = data;
> > > +    qemu_iovec_init_external(&qiov, &iov, 1);
> > > +    qemu_co_mutex_unlock(&s->lock);
> > > +    ret = bdrv_co_readv(bs, sector_num, nb_sectors, &qiov);
> > 
> > This function should be marked coroutine_fn - it may only be called from
> > inside a coroutine.  It's good to mark all coroutine functions so the
> > reader knows immediately this will run in coroutine context.
> > 
> > bdrv_co_readv() is does I/O throttling.  This is wrong here since we
> > don't want to charge for internal I/O.
> Should I use qcow2_co_readv to bypass the I/O throttling ?

I *think* it's alright because the other common feature - copy-on-read -
will already be handled correctly by the guest's I/O request.

Stefan



reply via email to

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