From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Richard Davies <richard@arachsys.com>,
Chris Webb <chris@arachsys.com>,
qemu-devel@nongnu.org, Zhi Yong Wu <wuzhy@cn.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] ide: convert ide_sector_read() to asynchronous I/O
Date: Thu, 29 Mar 2012 11:00:41 +0400 [thread overview]
Message-ID: <4F740899.8060800@msgid.tls.msk.ru> (raw)
In-Reply-To: <4F740560.5080507@msgid.tls.msk.ru>
On 29.03.2012 10:46, Michael Tokarev wrote:
> On 28.03.2012 19:43, Stefan Hajnoczi wrote:
> ...
>
>> void ide_sector_read(IDEState *s)
>> {
> ...
>> + s->iov.iov_base = s->io_buffer;
>> + s->iov.iov_len = n * BDRV_SECTOR_SIZE;
>> + qemu_iovec_init_external(&s->qiov, &s->iov, 1);
>> + bdrv_aio_readv(s->bs, sector_num, &s->qiov, n,
>> + ide_sector_read_cb, s);
>> }
>>
>> @@ -383,6 +383,8 @@ struct IDEState {
>> int cd_sector_size;
>> int atapi_dma; /* true if dma is requested for the packet cmd */
>> BlockAcctCookie acct;
>> + struct iovec iov;
>> + QEMUIOVector qiov;
>> /* ATA DMA state */
>> int io_buffer_size;
>> QEMUSGList sg;
>
> You don't actually need iov here, it can be a local variable
> just as well. The same applies to ide_sector_write() in the
> next patch. The state structure usually holds stuff which
> is actually needed to be keept across several calls, iov is
> not one of them.
Please ignore this one ;) For qemu_iovec_init_external(), the
real iov is ofcourse needed.
Thanks,
/mjt
next prev parent reply other threads:[~2012-03-29 7:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 15:43 [Qemu-devel] [PATCH 0/2] ide: convert pio code path to asynchronous I/O Stefan Hajnoczi
2012-03-28 15:43 ` [Qemu-devel] [PATCH 1/2] ide: convert ide_sector_read() " Stefan Hajnoczi
2012-03-29 6:42 ` Michael Tokarev
2012-03-29 8:29 ` Stefan Hajnoczi
2012-03-29 9:10 ` Paolo Bonzini
2012-03-29 6:46 ` Michael Tokarev
2012-03-29 7:00 ` Michael Tokarev [this message]
2012-03-28 15:43 ` [Qemu-devel] [PATCH 2/2] ide: convert ide_sector_write() " Stefan Hajnoczi
2012-03-28 15:51 ` [Qemu-devel] [PATCH 0/2] ide: convert pio code path " Chris Webb
2012-03-28 16:14 ` Paolo Bonzini
2012-03-29 2:15 ` Zhi Yong Wu
2012-03-29 11:30 ` Chris Webb
2012-03-29 13:36 ` Stefan Hajnoczi
2012-03-29 16:10 ` Chris Webb
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=4F740899.8060800@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=chris@arachsys.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard@arachsys.com \
--cc=stefanha@linux.vnet.ibm.com \
--cc=wuzhy@cn.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 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.