From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: famz@redhat.com, hare@suse.de, vrozenfe@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/4] scsi-disk: introduce dma_readv and dma_writev
Date: Thu, 19 May 2016 17:13:45 +0200 [thread overview]
Message-ID: <2e17dba4-16dd-87bb-7542-4c938df473e8@redhat.com> (raw)
In-Reply-To: <573DD795.4090201@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
On 19/05/2016 17:11, Eric Blake wrote:
>> > @@ -339,14 +354,16 @@ static void scsi_do_read(SCSIDiskReq *r, int ret)
>> > if (r->req.sg) {
>> > dma_acct_start(s->qdev.conf.blk, &r->acct, r->req.sg, BLOCK_ACCT_READ);
>> > r->req.resid -= r->req.sg->size;
>> > - r->req.aiocb = dma_blk_read(s->qdev.conf.blk, r->req.sg, r->sector,
>> > - scsi_dma_complete, r);
>> > + r->req.aiocb = dma_blk_io(blk_get_aio_context(s->qdev.conf.blk),
>> > + r->req.sg, r->sector,
>> > + sdc->dma_readv, r, scsi_dma_complete, r,
>> > + DMA_DIRECTION_FROM_DEVICE);
>
> Is it worth considering byte-based rather than sector-based interfaces,
> as part of this series?
I think it's a separate change. I'm okay with doing the switch to
byte-based interfaces first. Another related change would be to add a
"mask" argument, so that I could generalize this:
if (dbs->iov.size & ~BDRV_SECTOR_MASK) {
qemu_iovec_discard_back(&dbs->iov,
dbs->iov.size & ~BDRV_SECTOR_MASK);
}
For this series the mask needs to be the logical block size.
Thanks,
Paolo
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-05-19 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 11:41 [Qemu-devel] [PATCH 0/4] scsi-block: receive the right SCSI status on reads and writes Paolo Bonzini
2016-05-11 11:41 ` [Qemu-devel] [PATCH 1/4] scsi-disk: introduce a common base class Paolo Bonzini
2016-05-11 11:41 ` [Qemu-devel] [PATCH 2/4] dma-helpers: change BlockBackend to opaque value in DMAIOFunc Paolo Bonzini
2016-05-17 2:40 ` Fam Zheng
2016-05-11 11:41 ` [Qemu-devel] [PATCH 3/4] scsi-disk: introduce dma_readv and dma_writev Paolo Bonzini
2016-05-19 15:11 ` Eric Blake
2016-05-19 15:13 ` Paolo Bonzini [this message]
2016-05-11 11:41 ` [Qemu-devel] [PATCH 4/4] scsi-block: always use SG_IO Paolo Bonzini
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=2e17dba4-16dd-87bb-7542-4c938df473e8@redhat.com \
--to=pbonzini@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=hare@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=vrozenfe@redhat.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).