diff options
author | Denis V. Lunev <den@openvz.org> | 2016-05-25 21:48:45 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-06-08 10:21:08 +0200 |
commit | 443668ca408cdb7f01e1a70a58518bb100c3e9d1 (patch) | |
tree | 668a5dad129a866dcba61c066a193f42e5bdabd9 /xen-mapcache.c | |
parent | 6ed5546fa7bf12c5b87ef76bafb86e1d77ed6e85 (diff) |
block: split write_zeroes always
We should split requests even if they are less than write_zeroes_alignment.
For example we can have the following request:
offset 62k
size 4k
write_zeroes_alignment 64k
The original code sent 1 request covering 2 qcow2 clusters, and resulted
in both clusters being allocated. But by splitting the request, we can
cater to the case where one of the two clusters can be zeroed as a
whole, for only 1 cluster allocated after the operation.
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
Message-Id: <1463476543-3087-2-git-send-email-den@openvz.org>
[eblake: Avoid exceeding nb_sectors, hoist alignment checks out of
loop, and update testsuite to show that patch works]
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'xen-mapcache.c')
0 files changed, 0 insertions, 0 deletions