1. 13 3月, 2017 5 次提交
    • E
      vvfat: React to bdrv_is_allocated() errors · 6f712ee0
      Eric Blake 提交于
      If bdrv_is_allocated() fails, we should react to that failure.
      For 2 of the 3 callers, reporting the error was easy.  But in
      cluster_was_modified() and its lone caller
      get_cluster_count_for_direntry(), it's rather invasive to update
      the logic to pass the error back; so there, I went with merely
      documenting the issue by changing the return type to bool (in
      all likelihood, treating the cluster as modified will then
      trigger a read which will also fail, and eventually get to an
      error - but given the appalling number of abort() calls in this
      code, I'm not making it any worse).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6f712ee0
    • E
      backup: React to bdrv_is_allocated() errors · 666a9543
      Eric Blake 提交于
      If bdrv_is_allocated() fails, we should immediately do the backup
      error action, rather than attempting backup_do_cow() (although
      that will likely fail too).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      666a9543
    • E
      block: Drop unmaintained 'archipelago' driver · e32ccbc6
      Eric Blake 提交于
      The driver has failed to build since commit da34e65c, in qemu 2.6,
      due to a missing include of qapi/error.h for error_setg().
      Since no one has complained in three releases, it is easier to
      remove the dead code than to keep it around, especially since it
      is not being built by default and therefore prone to bitrot.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e32ccbc6
    • F
      file-posix: Consider max_segments for BlockLimits.max_transfer · 9103f1ce
      Fam Zheng 提交于
      BlockLimits.max_transfer can be too high without this fix, guest will
      encounter I/O error or even get paused with werror=stop or rerror=stop. The
      cause is explained below.
      
      Linux has a separate limit, /sys/block/.../queue/max_segments, which in
      the worst case can be more restrictive than the BLKSECTGET which we
      already consider (note that they are two different things). So, the
      failure scenario before this patch is:
      
      1) host device has max_sectors_kb = 4096 and max_segments = 64;
      2) guest learns max_sectors_kb limit from QEMU, but doesn't know
         max_segments;
      3) guest issues e.g. a 512KB request thinking it's okay, but actually
         it's not, because it will be passed through to host device as an
         SG_IO req that has niov > 64;
      4) host kernel doesn't like the segmenting of the request, and returns
         -EINVAL;
      
      This patch checks the max_segments sysfs entry for the host device and
      calculates a "conservative" bytes limit using the page size, which is
      then merged into the existing max_transfer limit. Guest will discover
      this from the usual virtual block device interfaces. (In the case of
      scsi-generic, it will be done in the INQUIRY reply interception in
      device model.)
      
      The other possibility is to actually propagate it as a separate limit,
      but it's not better. On the one hand, there is a big complication: the
      limit is per-LUN in QEMU PoV (because we can attach LUNs from different
      host HBAs to the same virtio-scsi bus), but the channel to communicate
      it in a per-LUN manner is missing down the stack; on the other hand,
      two limits versus one doesn't change much about the valid size of I/O
      (because guest has no control over host segmenting).
      
      Also, the idea to fall back to bounce buffering in QEMU, upon -EINVAL,
      was explored. Unfortunately there is no neat way to ensure the bounce
      buffer is less segmented (in terms of DMA addr) than the guest buffer.
      
      Practically, this bug is not very common. It is only reported on a
      Emulex (lpfc), so it's okay to get it fixed in the easier way.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      9103f1ce
    • V
      backup: allow target without .bdrv_get_info · a410a7f1
      Vladimir Sementsov-Ogievskiy 提交于
      Currently backup to nbd target is broken, as nbd doesn't have
      .bdrv_get_info realization.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a410a7f1
  2. 09 3月, 2017 3 次提交
  3. 08 3月, 2017 2 次提交
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · b64842de
      Peter Maydell 提交于
      Block layer fixes for 2.9.0-rc0
      
      # gpg: Signature made Tue 07 Mar 2017 14:59:18 GMT
      # gpg:                using RSA key 0x7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream: (27 commits)
        commit: Don't use error_abort in commit_start
        block: Don't use error_abort in blk_new_open
        sheepdog: Support blockdev-add
        qapi-schema: Rename SocketAddressFlat's variant tcp to inet
        qapi-schema: Rename GlusterServer to SocketAddressFlat
        gluster: Plug memory leaks in qemu_gluster_parse_json()
        gluster: Don't duplicate qapi-util.c's qapi_enum_parse()
        gluster: Drop assumptions on SocketTransport names
        sheepdog: Implement bdrv_parse_filename()
        sheepdog: Use SocketAddress and socket_connect()
        sheepdog: Report errors in pseudo-filename more usefully
        sheepdog: Don't truncate long VDI name in _open(), _create()
        sheepdog: Fix snapshot ID parsing in _open(), _create, _goto()
        sheepdog: Mark sd_snapshot_delete() lossage FIXME
        sheepdog: Fix error handling sd_create()
        sheepdog: Fix error handling in sd_snapshot_delete()
        sheepdog: Defuse time bomb in sd_open() error handling
        block: Fix error handling in bdrv_replace_in_backing_chain()
        block: Handle permission errors in change_parent_backing_link()
        block: Ignore multiple children in bdrv_check_update_perm()
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b64842de
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-block-2017-02-28-v4' into staging · 87467097
      Peter Maydell 提交于
      block: Command line option -blockdev
      
      # gpg: Signature made Tue 07 Mar 2017 15:07:59 GMT
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-block-2017-02-28-v4: (24 commits)
        keyval: Support lists
        docs/qapi-code-gen.txt: Clarify naming rules
        qapi: Improve how keyval input visitor reports unexpected dicts
        block: Initial implementation of -blockdev
        qapi: New qobject_input_visitor_new_str() for convenience
        keyval: Restrict key components to valid QAPI names
        qapi: New parse_qapi_name()
        test-qapi-util: New, covering qapi/qapi-util.c
        monitor: Assert qmp_schema_json[] is sane
        test-visitor-serialization: Pass &error_abort to qobject_from_json()
        check-qjson: Test errors from qobject_from_json()
        block: More detailed syntax error reporting for JSON filenames
        qobject: Propagate parse errors through qobject_from_json()
        test-qobject-input-visitor: Abort earlier on bad test input
        qjson: Abort earlier on qobject_from_jsonf() misuse
        libqtest: Fix qmp() & friends to abort on JSON parse errors
        qobject: Propagate parse errors through qobject_from_jsonv()
        qapi: Factor out common qobject_input_get_keyval()
        qapi: Factor out common part of qobject input visitor creation
        test-keyval: Cover use with qobject input visitor
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      87467097
  4. 07 3月, 2017 30 次提交