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 /qemu-img.c | |
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 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c index 46f2a6def4..76430a83cd 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1589,7 +1589,8 @@ static int convert_write(ImgConvertState *s, int64_t sector_num, int nb_sectors, if (s->has_zero_init) { break; } - ret = blk_write_zeroes(s->target, sector_num, n, 0); + ret = blk_write_zeroes(s->target, sector_num << BDRV_SECTOR_BITS, + n << BDRV_SECTOR_BITS, 0); if (ret < 0) { return ret; } |