mirror: Switch mirror_cow_align() to byte-based
commit782d97efec66d743f87f28f1d040cdfacc380b1e
authorEric Blake <eblake@redhat.com>
Fri, 7 Jul 2017 12:44:49 +0000 (7 07:44 -0500)
committerKevin Wolf <kwolf@redhat.com>
Mon, 10 Jul 2017 11:18:06 +0000 (10 13:18 +0200)
tree07f7ec6024e1d63e793341a2f90fa641d99b7ad9
parent931e52607fbecb40543b298d7ee8740d0e4af3ef
mirror: Switch mirror_cow_align() to byte-based

We are gradually converting to byte-based interfaces, as they are
easier to reason about than sector-based.  Convert another internal
function (no semantic change), and add mirror_clip_bytes() as a
counterpart to mirror_clip_sectors().  Some of the conversion is
a bit tricky, requiring temporaries to convert between units; it
will be cleared up in a following patch.

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