1. 08 6月, 2016 1 次提交
    • D
      block: split write_zeroes always · 443668ca
      Denis V. Lunev 提交于
      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: NDenis 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: NEric Blake <eblake@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      443668ca
  2. 07 6月, 2016 39 次提交