diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-05 18:11:51 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-06 13:15:25 +0200 |
commit | 8e321cc622a5583243b7641c84a5aeef66c07bb3 (patch) | |
tree | e6a61b4f5bc4a00e0142f82068a8a42c64f22236 /hw/scsi-defs.h | |
parent | 0a4ac106f780e2ddab27d6ab4e2880fa52a2c704 (diff) |
scsi: fix accounting of writes
Writes go through scsi_write_complete at least twice, the first time
to get some data without having actually written anything. Because
of this, the first time scsi_write_complete is called it will call
bdrv_acct_done and account a read incorrectly. Fix this by looking
at the aiocb. I am doing the same in scsi_read_complete for symmetry,
but it is only needed in the (bogus) case of bdrv_aio_readv returning
NULL.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-defs.h')
0 files changed, 0 insertions, 0 deletions