aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2015-10-28 17:32:59 +0200
committerKevin Wolf <kwolf@redhat.com>2015-11-12 16:22:45 +0100
commitc618f331d314c34ff2390d2dbd3f926e513c7059 (patch)
tree32cd3fa571ff29868b748f9068efb3b844b4badd /hw/ide
parent693044ebd20ce8730aae679ff58d52aa8ec60b0a (diff)
downloadqemu-c618f331d314c34ff2390d2dbd3f926e513c7059.zip
qemu-c618f331d314c34ff2390d2dbd3f926e513c7059.tar.gz
qemu-c618f331d314c34ff2390d2dbd3f926e513c7059.tar.bz2
ide: Account for write operations correctly
Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 2e71323c0875c2b66a8ae22229545e0c013af8d4.1446044837.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 364ba21..35ba1ad 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -895,7 +895,7 @@ static void ide_sector_write(IDEState *s)
qemu_iovec_init_external(&s->qiov, &s->iov, 1);
block_acct_start(blk_get_stats(s->blk), &s->acct,
- n * BDRV_SECTOR_SIZE, BLOCK_ACCT_READ);
+ n * BDRV_SECTOR_SIZE, BLOCK_ACCT_WRITE);
s->pio_aiocb = blk_aio_writev(s->blk, sector_num, &s->qiov, n,
ide_sector_write_cb, s);
}