block: Tighter assertions on bdrv_aligned_pwritev()
commitcff86b38aca34c9cc5c6f8846cc1c5b3d181c376
authorEric Blake <eblake@redhat.com>
Thu, 23 Jun 2016 22:37:05 +0000 (23 16:37 -0600)
committerKevin Wolf <kwolf@redhat.com>
Tue, 5 Jul 2016 14:46:24 +0000 (5 16:46 +0200)
treea46c1066dd8715dd3a809efb2bb61e6a78e9b68c
parentcfef6a45c7201c8219d819d792e5d99bbff32308
block: Tighter assertions on bdrv_aligned_pwritev()

For symmetry with bdrv_aligned_preadv(), assert that the caller
really has aligned things properly. This requires adding an align
parameter, which is used now only in the new asserts, but will
come in handy in a later patch that adds auto-fragmentation to the
max transfer size, since that value need not always be a multiple
of the alignment, and therefore must be rounded down.

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