qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] Combine bdrv_aio_readv and bdrv_aio_writev


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH 2/3] Combine bdrv_aio_readv and bdrv_aio_writev into bdrv_aio_rw_vector
Date: Wed, 29 Feb 2012 20:16:48 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20120104 Icedove/8.0

On 29.02.2012 19:54, Paolo Bonzini wrote:
> Il 29/02/2012 00:54, Michael Tokarev ha scritto:
>> iscsi block driver may receive some additional work.  For now, some
>> common code has been moved out of iscsi_aio_writev() and iscsi_aio_readv()
>> into iscsi_aio_rw_vector().  Leftovers there can be optimized further,
>> and consolidated into the rw_vector too.  Read and write callbacks are
>> consolidated as well, and once the XXX "todo" bounce-buffer change is
>> complete the only difference there should go away too.
> 
> What about flush, discard, etc.?
> 
> It seems to me that either we make a single entry point that takes some
> kind of BlockRequest, or there is no reason to do partial unification.

Flush and discard are quite special.  _All_ drivers provide reads and
writes (well, except of the case when the device is read-only by definition).
But very few provides discard, and discard is different from reads and
writes because it does not take any data.  Flush is of the same nature --
it is just request, no data.  So for these, separate methods exists
and are in use now -- only in these drivers where it is appropriate.

The only additional flag or operation which can be passed - which I can
think of, anyway - is WRITE_ZEROES.  But I think it is more of discard
variety than read/write.  So there, maybe it is discard method which
may be combined with write_zeroes, but not discard and flush combined
with reads and writes.

Thanks,

/mjt



reply via email to

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