qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH V3 5/6] ide: enable buffered reques


From: Peter Lieven
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH V3 5/6] ide: enable buffered requests for ATAPI devices
Date: Thu, 12 Nov 2015 12:42:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Am 12.11.2015 um 12:25 schrieb Fam Zheng:
On Fri, 11/06 09:42, Peter Lieven wrote:
Signed-off-by: Peter Lieven <address@hidden>
---
  hw/ide/atapi.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 29fd131..2f6d018 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -190,8 +190,8 @@ static int cd_read_sector(IDEState *s, void *buf)
      block_acct_start(blk_get_stats(s->blk), &s->acct,
                       4 * BDRV_SECTOR_SIZE, BLOCK_ACCT_READ);
- blk_aio_readv(s->blk, (int64_t)s->lba << 2, &s->qiov, 4,
-                  cd_read_sector_cb, s);
+    ide_buffered_readv(s, (int64_t)s->lba << 2, &s->qiov, 4,
+                       cd_read_sector_cb, s);
s->status |= BUSY_STAT;
      return 0;
@@ -424,9 +424,9 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret)
      s->bus->dma->iov.iov_len = n * 4 * 512;
      qemu_iovec_init_external(&s->bus->dma->qiov, &s->bus->dma->iov, 1);
- s->bus->dma->aiocb = blk_aio_readv(s->blk, (int64_t)s->lba << 2,
-                                       &s->bus->dma->qiov, n * 4,
-                                       ide_atapi_cmd_read_dma_cb, s);
+    s->bus->dma->aiocb = ide_buffered_readv(s, (int64_t)s->lba << 2,
+                                            &s->bus->dma->qiov, n * 4,
+                                            ide_atapi_cmd_read_dma_cb, s);
IIRC the dma aiocb are still going to be drained in bmdma_cmd_writeb, so why do
we need the bounce buffer?

They dont ;-)

If s->bus->dma->aiocb is a buffered Request, it will be set to NULL in this
call:

req->original_cb(req->original_opaque, -ECANCELED);

Peter





reply via email to

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