diff options
author | Eric Blake <eblake@redhat.com> | 2016-05-06 10:26:29 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-12 15:22:08 +0200 |
commit | 983a1600504b1b78242b9da29b0d7018a6eb231d (patch) | |
tree | eeac41d09075981786e1c56daad00f0fcad94752 /hw | |
parent | b7d17f9fa4df83ed060168c450889d73c441c8f6 (diff) |
block: Switch blk_*write_zeroes() to byte interface
Sector-based blk_write() should die; convert the one-off
variant blk_write_zeroes() to use an offset/count interface
instead. Likewise for blk_co_write_zeroes() and
blk_aio_write_zeroes().
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/scsi/scsi-disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index c3ce54a203..13353924d7 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1781,8 +1781,8 @@ static void scsi_disk_emulate_write_same(SCSIDiskReq *r, uint8_t *inbuf) nb_sectors * s->qdev.blocksize, BLOCK_ACCT_WRITE); r->req.aiocb = blk_aio_write_zeroes(s->qdev.conf.blk, - r->req.cmd.lba * (s->qdev.blocksize / 512), - nb_sectors * (s->qdev.blocksize / 512), + r->req.cmd.lba * s->qdev.blocksize, + nb_sectors * s->qdev.blocksize, flags, scsi_aio_complete, r); return; } |