xen_disk: fix io accounting
commit58da5b1e01a586eb5a52ba3eec342d6828269839
authorOlaf Hering <olaf@aepfle.de>
Thu, 20 Feb 2014 17:57:13 +0000 (20 17:57 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 20 Feb 2014 17:57:13 +0000 (20 17:57 +0000)
treee8f6f557e461227ad7d6b4a45e68b2221e4bab2b
parent15e8159e7613ec0b1418879acc916d1412c02a28
xen_disk: fix io accounting

bdrv_acct_done was called unconditional. But in case the ioreq has no
segments there is no matching bdrv_acct_start call. This could lead to
bogus accounting values.

Found by code inspection.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/block/xen_disk.c