block: make bdrv_co_do_write_zeroes stricter in producing aligned requests
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 Nov 2013 12:39:48 +0000 (13:39 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 3 Dec 2013 14:26:49 +0000 (15:26 +0100)
commitb8d71c09f31a9cae248d167dddc75c66d5135ff2
tree0495090149bcb5c9d160c06d3c9529d238148f66
parent7ce21016b69b512bf4777965a4292318f2bc7544
block: make bdrv_co_do_write_zeroes stricter in producing aligned requests

Right now, bdrv_co_do_write_zeroes will only try to align the
beginning of the request.  However, it is simpler for many
formats to expect the block layer to separate both the head *and*
the tail.  This makes sure that the format's bdrv_co_write_zeroes
function will be called with aligned sector_num and nb_sectors for
the bulk of the request.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block.c