1. 12 6月, 2018 33 次提交
  2. 11 6月, 2018 7 次提交
    • P
      Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2018-06-11' into staging · 2afc4e3d
      Peter Maydell 提交于
      Block patches:
      - Various bug fixes
      - Removal of qemu-img convert's deprecated -s option
      - qemu-io now exits with an error when a command failed
      
      # gpg: Signature made Mon 11 Jun 2018 15:23:42 BST
      # gpg:                using RSA key F407DB0061D5CF40
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>"
      # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40
      
      * remotes/maxreitz/tags/pull-block-2018-06-11: (29 commits)
        iotests: Add case for a corrupted inactive image
        qcow2: Do not mark inactive images corrupt
        block: Make bdrv_is_writable() public
        throttle: Fix crash on reopen
        block/qcow2-bitmap: fix free_bitmap_clusters
        qemu-img: Remove deprecated -s snapshot_id_or_name option
        iotests: Fix 219's timing
        iotests: improve pause_job
        iotests: Test post-backing convert target behavior
        qemu-img: Special post-backing convert handling
        iotests: Add test for rebasing with relative paths
        qemu-img: Resolve relative backing paths in rebase
        iotests: Let 216 make use of qemu-io's exit code
        iotests.py: Add qemu_io_silent
        qemu-io: Exit with error when a command failed
        qemu-io: Let command functions return error code
        qemu-io: Drop command functions' return values
        iotests: Repairing error during snapshot deletion
        qcow2: Repair OFLAG_COPIED when fixing leaks
        iotests: Rework 113
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2afc4e3d
    • M
      iotests: Add case for a corrupted inactive image · c50abd17
      Max Reitz 提交于
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Tested-by: NJeff Cody <jcody@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20180606193702.7113-4-mreitz@redhat.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c50abd17
    • M
      qcow2: Do not mark inactive images corrupt · ddf3b47e
      Max Reitz 提交于
      When signaling a corruption on a read-only image, qcow2 already makes
      fatal events non-fatal (i.e., they will not result in the image being
      closed, and the image header's corrupt flag will not be set).  This is
      necessary because we cannot set the corrupt flag on read-only images,
      and it is possible because further corruption of read-only images is
      impossible.
      
      Inactive images are effectively read-only, too, so we should do the same
      for them.  bdrv_is_writable() can tell us whether an image can actually
      be written to, so use its result instead of !bs->read_only.
      
      (Otherwise, the assert(!(bs->open_flags & BDRV_O_INACTIVE)) in
      bdrv_co_pwritev() will fail, crashing qemu.)
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20180606193702.7113-3-mreitz@redhat.com
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      ddf3b47e
    • M
      block: Make bdrv_is_writable() public · cc022140
      Max Reitz 提交于
      This is a useful function for the whole block layer, so make it public.
      At the same time, users outside of block.c probably do not need to make
      use of the reopen functionality, so rename the current function to
      bdrv_is_writable_after_reopen() create a new bdrv_is_writable() function
      that just passes NULL to it for the reopen queue.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 20180606193702.7113-2-mreitz@redhat.com
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      cc022140
    • A
      throttle: Fix crash on reopen · bc33c047
      Alberto Garcia 提交于
      The throttle block filter can be reopened, and with this it is
      possible to change the throttle group that the filter belongs to.
      
      The way the code does that is the following:
      
        - On throttle_reopen_prepare(): create a new ThrottleGroupMember
          and attach it to the new throttle group.
      
        - On throttle_reopen_commit(): detach the old ThrottleGroupMember,
          delete it and replace it with the new one.
      
      The problem with this is that by replacing the ThrottleGroupMember the
      previous value of io_limits_disabled is lost, causing an assertion
      failure in throttle_co_drain_end().
      
      This problem can be reproduced by reopening a throttle node:
      
         $QEMU -monitor stdio
         -object throttle-group,id=tg0,x-iops-total=1000 \
         -blockdev node-name=hd0,driver=qcow2,file.driver=file,file.filename=hd.qcow2 \
         -blockdev node-name=root,driver=throttle,throttle-group=tg0,file=hd0,read-only=on
      
         (qemu) block_stream root
         block/throttle.c:214: throttle_co_drain_end: Assertion `tgm->io_limits_disabled' failed.
      
      Since we only want to change the throttle group on reopen there's no
      need to create a ThrottleGroupMember and discard the old one. It's
      easier if we simply detach it from its current group and attach it to
      the new one.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Message-id: 20180608151536.7378-1-berto@igalia.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      bc33c047
    • V
      block/qcow2-bitmap: fix free_bitmap_clusters · 7eb24009
      Vladimir Sementsov-Ogievskiy 提交于
      This assert may fail, because bitmap_table is not initialized. Just
      drop it, as it's obvious, that bitmap_table_load sets bitmap_table
      parameter only when returning zero.
      Reported-by: NPavel Butsykin <pbutsykin@virtuozzo.com>
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-id: 20180608101225.2575-1-vsementsov@virtuozzo.com
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      7eb24009
    • T
      qemu-img: Remove deprecated -s snapshot_id_or_name option · 46e8d272
      Thomas Huth 提交于
      It has been marked as deprecated since QEMU v2.0 already, so it
      is time now to finally remove it.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1528288551-31641-1-git-send-email-thuth@redhat.com
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      46e8d272