]> git.proxmox.com Git - mirror_qemu.git/commit - block/mirror.c
mirror: Switch MirrorBlockJob to byte-based
authorEric Blake <eblake@redhat.com>
Fri, 7 Jul 2017 12:44:46 +0000 (07:44 -0500)
committerKevin Wolf <kwolf@redhat.com>
Mon, 10 Jul 2017 11:18:06 +0000 (13:18 +0200)
commitb436982f04fb33bb29fcdea190bd1fdc97dc65ef
tree08a18161ce64f7aca736a8fbe3a58aa011d2b9d9
parent317a6676a279bf71c881992387f75e16e009259c
mirror: Switch MirrorBlockJob to byte-based

We are gradually converting to byte-based interfaces, as they are
easier to reason about than sector-based.  Continue by converting an
internal structure (no semantic change), and all references to the
buffer size.

Add an assertion that our use of s->granularity >> BDRV_SECTOR_BITS
(necessary for interaction with sector-based dirty bitmaps, until
a later patch converts those to be byte-based) does not suffer from
truncation problems.

[checkpatch has a false positive on use of MIN() in this patch]

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