All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <4F4E4F70.3060500@msgid.tls.msk.ru> (raw)
In-Reply-To: <jilhnm$cv8$1@dough.gmane.org>

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	other threads:[~2012-02-29 16:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1330473276-8975-1-git-send-email-mjt@tls.msk.ru>
2012-02-28 23:54 ` [Qemu-devel] [PATCH 1/3] Combine bdrv_read and bdrv_write to bdrv_rw Michael Tokarev
2012-02-29 15:53   ` Paolo Bonzini
2012-02-29 16:00     ` Michael Tokarev
2012-02-29 16:07       ` Paolo Bonzini
2012-02-29 16:36         ` Michael Tokarev
2012-02-28 23:54 ` [Qemu-devel] [PATCH 2/3] Combine bdrv_aio_readv and bdrv_aio_writev into bdrv_aio_rw_vector Michael Tokarev
2012-02-29 15:54   ` Paolo Bonzini
2012-02-29 16:16     ` Michael Tokarev [this message]
2012-02-28 23:54 ` [Qemu-devel] [PATCH 3/3] Combine bdrv_co_readv and bdrv_co_writev into bdrv_co_rw_vector Michael Tokarev
2012-02-29 16:01   ` Paolo Bonzini
2012-02-29 16:12     ` Michael Tokarev
2012-02-29 16:24       ` Paolo Bonzini
2012-02-29 16:45         ` Michael Tokarev

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=4F4E4F70.3060500@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.