]> Git Repo - qemu.git/commitdiff
xen_disk: Account for flush operations
authorAlberto Garcia <[email protected]>
Wed, 28 Oct 2015 15:32:58 +0000 (17:32 +0200)
committerKevin Wolf <[email protected]>
Thu, 12 Nov 2015 15:22:45 +0000 (16:22 +0100)
Currently both BLKIF_OP_WRITE and BLKIF_OP_FLUSH_DISKCACHE are being
accounted as write operations.

Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: 7a2a14e3ac62027aa6267a6c02abc70717be9c0a.1446044837[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
hw/block/xen_disk.c

index 1bbc111939bf76574dd80623a4a896c3bb050848..4869518fdd3ad783e2481b7647c2183401f7ed0a 100644 (file)
@@ -576,7 +576,9 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
         }
 
         block_acct_start(blk_get_stats(blkdev->blk), &ioreq->acct,
-                         ioreq->v.size, BLOCK_ACCT_WRITE);
+                         ioreq->v.size,
+                         ioreq->req.operation == BLKIF_OP_WRITE ?
+                         BLOCK_ACCT_WRITE : BLOCK_ACCT_FLUSH);
         ioreq->aio_inflight++;
         blk_aio_writev(blkdev->blk, ioreq->start / BLOCK_SIZE,
                        &ioreq->v, ioreq->v.size / BLOCK_SIZE,
This page took 0.024864 seconds and 4 git commands to generate.