1. 10 11月, 2017 3 次提交
    • E
      nbd/client: Nicer trace of structured reply · 079d3266
      Eric Blake 提交于
      It's useful to know which structured reply chunk is being processed.
      Missed in commit d2febedb.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-4-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      079d3266
    • E
      nbd-client: Refuse read-only client with BDRV_O_RDWR · 1104d83c
      Eric Blake 提交于
      The NBD spec says that clients should not try to write/trim to
      an export advertised as read-only by the server.  But we failed
      to check that, and would allow the block layer to use NBD with
      BDRV_O_RDWR even when the server is read-only, which meant we
      were depending on the server sending a proper EPERM failure for
      various commands, and also exposes a leaky abstraction: using
      qemu-io in read-write mode would succeed on 'w -z 0 0' because
      of local short-circuiting logic, but 'w 0 0' would send a
      request over the wire (where it then depends on the server, and
      fails at least for qemu-nbd but might pass for other NBD
      implementations).
      
      With this patch, a client MUST request read-only mode to access
      a server that is doing a read-only export, or else it will get
      a message like:
      
      can't open device nbd://localhost:10809/foo: request for write access conflicts with read-only export
      
      It is no longer possible to even attempt writes over the wire
      (including the corner case of 0-length writes), because the block
      layer enforces the explicit read-only request; this matches the
      behavior of qcow2 when backed by a read-only POSIX file.
      
      Fix several iotests to comply with the new behavior (since
      qemu-nbd of an internal snapshot, as well as nbd-server-add over QMP,
      default to a read-only export, we must tell blockdev-add/qemu-io to
      set up a read-only client).
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-3-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      1104d83c
    • E
      nbd-client: Fix error message typos · e659fb3b
      Eric Blake 提交于
      Provide missing spaces that are required when using string
      concatenation to break error messages across source lines.
      Introduced in commit f140e300.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171108215703.9295-2-eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      e659fb3b
  2. 09 11月, 2017 1 次提交
    • V
      nbd/server: fix nbd_negotiate_handle_info · 46321d6b
      Vladimir Sementsov-Ogievskiy 提交于
      namelen should be here, length is unrelated, and always 0 at this
      point.  Broken in introduction in commit f37708f6, but mostly
      harmless (replying with '' as the name does not violate protocol,
      and does not confuse qemu as the nbd client since our implementation
      does not ask for the name; but might confuse some other client that
      does ask for the name especially if the default export is different
      than the export name being queried).
      
      Adding an assert makes it obvious that we are not skipping any bytes
      in the client's message, as well as making it obvious that we were
      using the wrong variable.
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      CC: qemu-stable@nongnu.org
      Message-Id: <20171101154204.27146-1-vsementsov@virtuozzo.com>
      [eblake: improve commit message, squash in assert addition]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      46321d6b
  3. 08 11月, 2017 1 次提交
  4. 07 11月, 2017 19 次提交
  5. 06 11月, 2017 12 次提交
  6. 05 11月, 2017 2 次提交
  7. 03 11月, 2017 2 次提交
    • P
      Merge remote-tracking branch... · b33afc41
      Peter Maydell 提交于
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-ci-updates-for-softfreeze-021117-2' into staging
      
      One fix for win32/64 cross compiles.
      
      # gpg: Signature made Thu 02 Nov 2017 11:55:46 GMT
      # gpg:                using RSA key 0xFBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-ci-updates-for-softfreeze-021117-2:
        docker: add python stdlib dependency (required by keycodemapdb)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b33afc41
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20171103' into staging · 9c4da1fa
      Peter Maydell 提交于
      Queued tcg patches
      
      # gpg: Signature made Fri 03 Nov 2017 08:37:58 GMT
      # gpg:                using RSA key 0x64DF38E8AF7E215F
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * remotes/rth/tags/pull-tcg-20171103:
        cpu-exec: Exit exclusive region on longjmp from step_atomic
        tcg/s390x: Use constant pool for prologue
        tcg: Allow constant pool entries in the prologue
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9c4da1fa