1. 29 9月, 2012 1 次提交
    • J
      qemu-iotests: add initial tests for live block commit · 747051cd
      Jeff Cody 提交于
      Derived from the streaming test cases (030), this adds the
      following 9 tests:
      
      1. For the following image chain, commit [mid] into [backing],
         and use qemu-io to verify [backing] has its original data, as
         well as the data from [mid]
      
                 [backing] <-- [mid] <-- [test]
      
      2. Verifies that 'block-commit' with the 'speed' parameter sets the
         speed parameter, as reported by 'query-block-jobs'
      
      3. Verifies that a bogus 'device' parameter to 'block-commit'
         results in error
      
      4-9: Appropriate error values returned for the following argument errors:
          * top == base
          * top is nonexistent
          * base is nonexistent
          * top == active layer (this is currently not supported)
          * top and base arguments are reversed
          * top argument is omitted
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      747051cd
  2. 29 8月, 2012 1 次提交
  3. 17 8月, 2012 1 次提交
  4. 15 8月, 2012 2 次提交
  5. 10 8月, 2012 3 次提交
  6. 07 8月, 2012 6 次提交
    • K
      qemu-iotests: Be more flexible with image creation options · b0869a46
      Kevin Wolf 提交于
      qemu-iotests already filters out image creation options that may be
      present or not in order to get the same output in both cases. However,
      often it only considers the default value of the option. Cover all valid
      values instead so that ./check -o name=value can be used successfull for
      all of them.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b0869a46
    • S
      qemu-iotests: add 039 qcow2 lazy refcounts test · dc68afe0
      Stefan Hajnoczi 提交于
      This tests establishes the basic post-conditions of the qcow2 lazy
      refcounts features:
      
        1. If the image was closed normally, it is marked clean.
      
        2. If an allocating write was performed and the image was not closed
           normally, then it is marked dirty.
      
           a. Written data can be read back successfully.
           b. The image file can be repaired and will be marked clean again.
           c. The image file is automatically repaired when opened read/write.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      dc68afe0
    • S
      qcow2: implement lazy refcounts · bfe8043e
      Stefan Hajnoczi 提交于
      Lazy refcounts is a performance optimization for qcow2 that postpones
      refcount metadata updates and instead marks the image dirty.  In the
      case of crash or power failure the image will be left in a dirty state
      and repaired next time it is opened.
      
      Reducing metadata I/O is important for cache=writethrough and
      cache=directsync because these modes guarantee that data is on disk
      after each write (hence we cannot take advantage of caching updates in
      RAM).  Refcount metadata is not needed for guest->file block address
      translation and therefore does not need to be on-disk at the time of
      write completion - this is the motivation behind the lazy refcount
      optimization.
      
      The lazy refcount optimization must be enabled at image creation time:
      
        qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on a.qcow2 10G
        qemu-system-x86_64 -drive if=virtio,file=a.qcow2,cache=writethrough
      
      Update qemu-iotests 031 and 036 since the extension header size changes
      when we add feature bit table entries.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      bfe8043e
    • S
      qemu-iotests: ignore qemu-img create lazy_refcounts output · 91cf8a35
      Stefan Hajnoczi 提交于
      Hide the default lazy_refcounts=off output from qemu-img like we do with
      other image creation options.  This ensures that existing golden outputs
      continue to pass despite the new option that has been added.
      
      Note that this patch applies before the one that actually introduces the
      lazy_refcounts=on|off option.  This ensures git-bisect(1) continues to
      work.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      91cf8a35
    • S
      qcow2: introduce dirty bit · c61d0004
      Stefan Hajnoczi 提交于
      This patch adds an incompatible feature bit to mark images that have not
      been closed cleanly.  When a dirty image file is opened a consistency
      check and repair is performed.
      
      Update qemu-iotests 031 and 036 since the extension header size changes
      when we add feature bit table entries.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c61d0004
    • S
      qemu-iotests: add qed.py image manipulation utility · e77964f7
      Stefan Hajnoczi 提交于
      The qed.py utility can inspect and manipulate QED image files.  It can
      be used for testing to see the state of image metadata and also to
      inject corruptions into the image file.  It also has a scrubbing feature
      to copy just the metadata out of an image file, allowing users to share
      broken image files without revealing data in bug reports.
      
      This has lived in my local repo for a long time but could be useful
      to others.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e77964f7
  7. 28 7月, 2012 2 次提交
  8. 23 7月, 2012 2 次提交
  9. 17 7月, 2012 7 次提交
  10. 09 7月, 2012 3 次提交
  11. 28 6月, 2012 1 次提交
    • A
      qtest: fix infinite loop when QEMU aborts abruptly · 039380a8
      Anthony Liguori 提交于
      From Markus:
      
      Makes "make check" hang:
      
          QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 gtester -k --verbose -m=quick tests/crash-test tests/rtc-test
          TEST: tests/crash-test... (pid=972)
          qemu-system-x86_64: Device needs media, but drive is empty
      [Nothing happens, wait a while, then hit ^C]
          make: *** [check-qtest-x86_64] Interrupt
      
      This was due to the fact that we weren't checked for errors when
      reading from the QMP socket.  This patch adds appropriate error
      checking.
      Reported-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      039380a8
  12. 22 6月, 2012 2 次提交
  13. 15 6月, 2012 7 次提交
  14. 12 6月, 2012 1 次提交
    • M
      rewrite iov_send_recv() and move it to iov.c · 25e5e4c7
      Michael Tokarev 提交于
      Make it much more understandable, add a missing
      iov_cnt argument (number of iovs in the iov), and
      add comments to it.
      
      The new implementation has been extensively tested
      by splitting a large buffer into many small
      randomly-sized chunks, sending it over socket to
      another, slow process and verifying the receiving
      data is the same.
      
      Also add a unit test for iov_send_recv(), sending/
      receiving data between two processes over a socketpair
      using random vectors and random sizes.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      25e5e4c7
  15. 09 6月, 2012 1 次提交