1. 08 6月, 2016 4 次提交
    • E
      qcow2: Catch more unaligned write_zero into zero cluster · ebb718a5
      Eric Blake 提交于
      is_zero_cluster() and is_zero_cluster_top_locked() are used only
      by qcow2_co_write_zeroes().  The former is too broad (we don't
      care if the sectors we are about to overwrite are non-zero, only
      that all other sectors in the cluster are zero), so it needs to
      be called up to twice but with smaller limits - rename it along
      with adding the neeeded parameter.  The latter can be inlined for
      more compact code.
      
      The testsuite change shows that we now have a sparser top file
      when an unaligned write_zeroes overwrites the only portion of
      the backing file with data.
      
      Based on a patch proposal by Denis V. Lunev.
      
      CC: Denis V. Lunev <den@openvz.org>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDenis V. Lunev <den@openvz.org>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ebb718a5
    • D
      qcow2: add tracepoints for qcow2_co_write_zeroes · 5a64e942
      Denis V. Lunev 提交于
      This patch follows guidelines of all other tracepoints in qcow2, like ones
      in qcow2_co_writev. I think that they should dump values in the same
      quantities or be changed all together.
      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-4-git-send-email-den@openvz.org>
      [eblake: typo fix in commit message]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5a64e942
    • D
      qcow2: simplify logic in qcow2_co_write_zeroes · ba142846
      Denis V. Lunev 提交于
      Unaligned requests will occupy only one cluster. This is true since the
      previous commit. Simplify the code taking this consideration into
      account.
      
      In other words, the caller is now buggy if it ever passes us an unaligned
      request that crosses cluster boundaries (the only requests that can cross
      boundaries will be aligned).
      
      There are no other changes so far.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      Message-Id: <1463476543-3087-3-git-send-email-den@openvz.org>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ba142846
    • 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 9 次提交
  3. 29 5月, 2016 1 次提交
  4. 26 5月, 2016 18 次提交
  5. 23 5月, 2016 1 次提交
  6. 19 5月, 2016 7 次提交