1. 16 8月, 2014 31 次提交
  2. 15 8月, 2014 9 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging · 5c6b3c50
      Peter Maydell 提交于
      Tracing pull request
      
      * remotes/stefanha/tags/tracing-pull-request:
        virtio-rng: add some trace events
        trace: add some tcg tracing support
        trace: teach lttng backend to use format strings
        trace: [tcg] Include TCG-tracing header on all targets
        trace: [tcg] Include event definitions in "trace.h"
        trace: [tcg] Generate TCG tracing routines
        trace: [tcg] Include TCG-tracing helpers
        trace: [tcg] Define TCG tracing helper routine wrappers
        trace: [tcg] Define TCG tracing helper routines
        trace: [tcg] Declare TCG tracing helper routines
        trace: [tcg] Add 'tcg' event property
        trace: [tcg] Argument type transformation machinery
        trace: [tcg] Argument type transformation rules
        trace: [tcg] Add documentation
        trace: install simpletrace SystemTap tapset
        simpletrace: add simpletrace.py --no-header option
        trace: add tracetool simpletrace_stap format
        trace: extract stap_escape() function for reuse
      
      Conflicts:
      	Makefile.objs
      5c6b3c50
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · f2fb1da9
      Peter Maydell 提交于
      Block patches
      
      # gpg: Signature made Fri 15 Aug 2014 14:07:42 BST using RSA key ID C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      
      * remotes/kevin/tags/for-upstream: (59 commits)
        block: Catch !bs->drv in bdrv_check()
        iotests: Add test for image header overlap
        qcow2: Catch !*host_offset for data allocation
        qcow2: Return useful error code in refcount_init()
        mirror: Handle failure for potentially large allocations
        vpc: Handle failure for potentially large allocations
        vmdk: Handle failure for potentially large allocations
        vhdx: Handle failure for potentially large allocations
        vdi: Handle failure for potentially large allocations
        rbd: Handle failure for potentially large allocations
        raw-win32: Handle failure for potentially large allocations
        raw-posix: Handle failure for potentially large allocations
        qed: Handle failure for potentially large allocations
        qcow2: Handle failure for potentially large allocations
        qcow1: Handle failure for potentially large allocations
        parallels: Handle failure for potentially large allocations
        nfs: Handle failure for potentially large allocations
        iscsi: Handle failure for potentially large allocations
        dmg: Handle failure for potentially large allocations
        curl: Handle failure for potentially large allocations
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f2fb1da9
    • M
      block: Catch !bs->drv in bdrv_check() · 908bcd54
      Max Reitz 提交于
      qemu-img check calls bdrv_check() twice if the first run repaired some
      inconsistencies. If the first run however again triggered corruption
      prevention (on qcow2) due to very bad inconsistencies, bs->drv may be
      NULL afterwards. Thus, bdrv_check() should check whether bs->drv is set.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      908bcd54
    • M
      iotests: Add test for image header overlap · a42f8a3d
      Max Reitz 提交于
      Add a test for an image with an unallocated image header; instead of an
      assertion, this should result in the image being marked corrupt.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a42f8a3d
    • M
      qcow2: Catch !*host_offset for data allocation · ff52aab2
      Max Reitz 提交于
      qcow2_alloc_cluster_offset() uses host_offset == 0 as "no preferred
      offset" for the (data) cluster range to be allocated. However, this
      offset is actually valid and may be allocated on images with a corrupted
      refcount table or first refcount block.
      
      In this case, the corruption prevention should normally catch that
      write anyway (because it would overwrite the image header). But since 0
      is a special value here, the function assumes that nothing has been
      allocated at all which it asserts against.
      
      Because this condition is not qemu's fault but rather that of a broken
      image, it shouldn't throw an assertion but rather mark the image corrupt
      and show an appropriate message, which this patch does by calling the
      corruption check earlier than it would be called normally (before the
      assertion).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ff52aab2
    • M
      qcow2: Return useful error code in refcount_init() · 8fcffa98
      Max Reitz 提交于
      If bdrv_pread() returns an error, it is very unlikely that it was
      ENOMEM. In this case, the return value should be passed along; as
      bdrv_pread() will always either return the number of bytes read or a
      negative value (the error code), the condition for checking whether
      bdrv_pread() failed can be simplified (and clarified) as well.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      8fcffa98
    • K
      mirror: Handle failure for potentially large allocations · 7504edf4
      Kevin Wolf 提交于
      Some code in the block layer makes potentially huge allocations. Failure
      is not completely unexpected there, so avoid aborting qemu and handle
      out-of-memory situations gracefully.
      
      This patch addresses the allocations in the mirror block job.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      7504edf4
    • K
      vpc: Handle failure for potentially large allocations · 5fb09cd5
      Kevin Wolf 提交于
      Some code in the block layer makes potentially huge allocations. Failure
      is not completely unexpected there, so avoid aborting qemu and handle
      out-of-memory situations gracefully.
      
      This patch addresses the allocations in the vpc block driver.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      5fb09cd5
    • K
      vmdk: Handle failure for potentially large allocations · d6e59931
      Kevin Wolf 提交于
      Some code in the block layer makes potentially huge allocations. Failure
      is not completely unexpected there, so avoid aborting qemu and handle
      out-of-memory situations gracefully.
      
      This patch addresses the allocations in the vmdk block driver.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      d6e59931