OSDN Git Service

block: Switch bdrv_make_zero() to byte-based
authorEric Blake <eblake@redhat.com>
Thu, 12 Oct 2017 03:47:01 +0000 (22:47 -0500)
committerKevin Wolf <kwolf@redhat.com>
Thu, 26 Oct 2017 12:45:57 +0000 (14:45 +0200)
commit7286d6106fd2c8f2646415c8e02438db3c21a46f
tree8c360915262f33bcf0e6bb1199f2d3f89f6ecbf9
parentf06f6b66c789c41165b46f98c88141b955cd594d
block: Switch bdrv_make_zero() to byte-based

We are gradually converting to byte-based interfaces, as they are
easier to reason about than sector-based.  Change the internal
loop iteration of zeroing a device to track by bytes instead of
sectors (although we are still guaranteed that we iterate by steps
that are sector-aligned).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c