1. 25 9月, 2013 1 次提交
    • M
      qcow2: Don't shadow return value · 7454d600
      Max Reitz 提交于
      When trying to update the refcounts for a snapshot, the return value of
      update_refcount on a compressed cluster was pretty much ignored,
      cancelling the update on error but returning 0. This is caused by an
      inner "ret" variable shadowing the outer one (the latter is used in the
      return statement).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      7454d600
  2. 12 9月, 2013 1 次提交
  3. 02 9月, 2013 1 次提交
  4. 30 8月, 2013 4 次提交
    • M
      qcow2-refcount: Repair OFLAG_COPIED errors · e23e400e
      Max Reitz 提交于
      Since the OFLAG_COPIED checks are now executed after the refcounts have
      been repaired (if repairing), it is safe to assume that they are correct
      but the OFLAG_COPIED flag may be not. Therefore, if its value differs
      from what it should be (considering the according refcount), that
      discrepancy can be repaired by correctly setting (or clearing that flag.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e23e400e
    • M
      qcow2-refcount: Move OFLAG_COPIED checks · 4f6ed88c
      Max Reitz 提交于
      Move the OFLAG_COPIED checks out of check_refcounts_l1 and
      check_refcounts_l2 and after the actual refcount checks/fixes (since the
      refcounts might actually change there).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4f6ed88c
    • M
      qcow2: Metadata overlap checks · a40f1c2a
      Max Reitz 提交于
      Two new functions are added; the first one checks a given range in the
      image file for overlaps with metadata (main header, L1 tables, L2
      tables, refcount table and blocks).
      
      The second one should be used immediately before writing to the image
      file as it calls the first function and, upon collision, marks the
      image as corrupt and makes the BDS unusable, thereby preventing
      further access.
      
      Both functions take a bitmask argument specifying the structures which
      should be checked for overlaps, making it possible to also check
      metadata writes against colliding with other structures.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a40f1c2a
    • M
      qcow2-refcount: Snapshot update for zero clusters · 8b81a7b6
      Max Reitz 提交于
      Account for all cluster types in qcow2_update_snapshot_refcounts;
      this prevents this function from updating the refcount of unallocated
      zero clusters which effectively led to wrong adjustments of the refcount
      of cluster 0 (the main qcow2 header). This in turn resulted in images
      with (unallocated) zero clusters having a cluster 0 refcount greater
      than one after creating a snapshot.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8b81a7b6
  5. 24 6月, 2013 3 次提交
  6. 06 4月, 2013 2 次提交
  7. 28 3月, 2013 1 次提交
  8. 15 3月, 2013 5 次提交
  9. 23 2月, 2013 4 次提交
  10. 30 1月, 2013 1 次提交
  11. 19 12月, 2012 1 次提交
  12. 15 11月, 2012 1 次提交
  13. 09 7月, 2012 1 次提交
  14. 15 6月, 2012 3 次提交
  15. 20 4月, 2012 6 次提交
  16. 19 4月, 2012 1 次提交
  17. 12 3月, 2012 1 次提交
  18. 05 12月, 2011 1 次提交
  19. 25 8月, 2011 2 次提交