1. 20 11月, 2018 1 次提交
  2. 19 11月, 2018 2 次提交
  3. 05 11月, 2018 5 次提交
    • M
      option: Make option help nicer to read · 63898712
      Max Reitz 提交于
      This adds some whitespace into the option help (including indentation)
      and puts angle brackets around the type names.  Furthermore, the list
      name is no longer printed as part of every line, but only once in
      advance, and only if the caller did not print a caption already.
      
      This patch also restores the description alignment we had before commit
      9cbef9d6, just at 24 instead of 16 characters like we used to.
      This increase is because now we have the type and two spaces of
      indentation before the description, and with a usual type name length of
      three chracters, this sums up to eight additional characters -- which
      means that we now need 24 characters to get the same amount of padding
      for most options.  Also, 24 is a third of 80, which makes it kind of a
      round number in terminal terms.
      
      Finally, this patch amends the reference output of iotest 082 to match
      the changes (and thus makes it pass again).
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      63898712
    • K
      36f808fa
    • A
      iotest: Test x-blockdev-change on a Quorum · 04f600ef
      Alberto Garcia 提交于
      This patch tests that you can add and remove drives from a Quorum
      using the x-blockdev-change command.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      04f600ef
    • A
      82c4c859
    • C
      iotests: make 083 specific to raw · d98205c5
      Cleber Rosa 提交于
      While testing the Python 3 changes which touch the 083 test, I noticed
      that it would fail with qcow2.  Expanding the testing, I noticed it
      had nothing to do with the Python 3 changes, and in fact, it would not
      pass on anything but raw:
      
       raw: pass
       bochs: not generic
       cloop: not generic
       parallels: fail
       qcow: fail
       qcow2: fail
       qed: fail
       vdi: fail
       vhdx: fail
       vmdk: fail
       vpc: fail
       luks: fail
      
      The errors are a mixture I/O and "image not in xxx format", such as:
      
        === Check disconnect before data ===
      
        Unexpected end-of-file before all bytes were read
       -read failed: Input/output error
       +can't open device nbd+tcp://127.0.0.1:PORT/foo: Could not open 'nbd://127.0.0.1:PORT/foo': Input/output error
      
        === Check disconnect after data ===
      
       -read 512/512 bytes at offset 0
       -512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
       +can't open device nbd+tcp://127.0.0.1:PORT/foo: Image not in qcow format
      
      I'm not aware if there's a quick fix, so, for the time being, it looks
      like the honest approach is to make the test known to work on raw
      only.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d98205c5
  4. 31 10月, 2018 9 次提交
  5. 30 10月, 2018 3 次提交
  6. 26 10月, 2018 3 次提交
  7. 19 10月, 2018 1 次提交
    • M
      block: Clean up bdrv_img_create()'s error reporting · da7e92ca
      Markus Armbruster 提交于
      bdrv_img_create() takes an Error ** argument and uses it in the
      conventional way, except for one place: when qemu_opts_do_parse()
      fails, it first reports its error to stderr or the HMP monitor with
      error_report_err(), then error_setg()'s a generic error.
      
      When the caller reports that second error similarly, this produces two
      consecutive error messages on stderr or the HMP monitor.
      
      When the caller does something else with it, such as send it via QMP,
      the first error still goes to stderr or the HMP monitor.  Fortunately,
      no such caller exists.
      
      Simply use the first error as is.  Update expected output of
      qemu-iotest 049 accordingly.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20181017082702.5581-37-armbru@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      da7e92ca
  8. 02 10月, 2018 1 次提交
    • K
      block-backend: Set werror/rerror defaults in blk_new() · cb53460b
      Kevin Wolf 提交于
      Currently, the default values for werror and rerror have to be set
      explicitly with blk_set_on_error() by the callers of blk_new(). The only
      caller actually doing this is blockdev_init(), which is called for
      BlockBackends created using -drive.
      
      In particular, anonymous BlockBackends created with
      -device ...,drive=<node-name> didn't get the correct default set and
      instead defaulted to the integer value 0 (= BLOCKDEV_ON_ERROR_REPORT).
      This is the intended default for rerror anyway, but the default for
      werror should be BLOCKDEV_ON_ERROR_ENOSPC.
      
      Set the defaults in blk_new() instead so that they apply no matter what
      way the BlockBackend was created.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      cb53460b
  9. 01 10月, 2018 2 次提交
    • L
      qcow2: Assign the L2 cache relatively to the image size · b749562d
      Leonid Bloch 提交于
      Sufficient L2 cache can noticeably improve the performance when using
      large images with frequent I/O.
      
      Previously, unless 'cache-size' was specified and was large enough, the
      L2 cache was set to a certain size without taking the virtual image size
      into account.
      
      Now, the L2 cache assignment is aware of the virtual size of the image,
      and will cover the entire image, unless the cache size needed for that is
      larger than a certain maximum. This maximum is set to 1 MB by default
      (enough to cover an 8 GB image with the default cluster size) but can
      be increased or decreased using the 'l2-cache-size' option. This option
      was previously documented as the *maximum* L2 cache size, and this patch
      makes it behave as such, instead of as a constant size. Also, the
      existing option 'cache-size' can limit the sum of both L2 and refcount
      caches, as previously.
      Signed-off-by: NLeonid Bloch <lbloch@janustech.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b749562d
    • F
      file-posix: Include filename in locking error message · b857431d
      Fam Zheng 提交于
      Image locking errors happening at device initialization time doesn't say
      which file cannot be locked, for instance,
      
          -device scsi-disk,drive=drive-1: Failed to get shared "write" lock
          Is another process using the image?
      
      could refer to either the overlay image or its backing image.
      
      Hoist the error_append_hint to the caller of raw_check_lock_bytes where
      file name is known, and include it in the error hint.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b857431d
  10. 25 9月, 2018 3 次提交
  11. 22 8月, 2018 1 次提交
  12. 15 8月, 2018 3 次提交
    • K
      mirror: Fail gracefully for source == target · 86fae10c
      Kevin Wolf 提交于
      blockdev-mirror with the same node for source and target segfaults
      today: A node is in its own backing chain, so mirror_start_job() decides
      that this is an active commit. When adding the intermediate nodes with
      block_job_add_bdrv(), it starts the iteration through the subchain with
      the backing file of source, though, so it never reaches target and
      instead runs into NULL at the base.
      
      While we could fix that by starting with source itself, there is no
      point in allowing mirroring a node into itself and I wouldn't be
      surprised if this caused more problems later.
      
      So just check for this scenario and error out.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      86fae10c
    • A
      qemu-iotests: Update 093 to improve the draining test · 3db3e9c6
      Alberto Garcia 提交于
      The previous patch fixes a problem in which draining a block device
      with more than one throttled request can make it wait first for the
      completion of requests in other members of the same group.
      
      This patch updates test_remove_group_member() in iotest 093 to
      reproduce that scenario. This updated test would hang QEMU without the
      fix from the previous patch.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3db3e9c6
    • A
      qemu-iotests: Test removing a throttle group member with a pending timer · ef7a6a3c
      Alberto Garcia 提交于
      A throttle group can have several members, and each one of them can
      have several pending requests in the queue.
      
      The requests are processed in a round-robin fashion, so the algorithm
      decides the drive that is going to run the next request and sets a
      timer in it. Once the timer fires and the throttled request is run
      then the next drive from the group is selected and a new timer is set.
      
      If the user tried to remove a drive from a group and that drive had a
      timer set then the code was not taking care of setting up a new timer
      in one of the remaining members of the group, freezing their I/O.
      
      This problem was fixed in 6fccbb47,
      and this patch adds a new test case that reproduces this exact
      scenario.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ef7a6a3c
  13. 30 7月, 2018 4 次提交
  14. 23 7月, 2018 2 次提交