1. 11 Dec, 2018 9 commits
  2. 06 Dec, 2018 2 commits
  3. 04 Dec, 2018 6 commits
  4. 03 Dec, 2018 9 commits
  5. 30 Nov, 2018 3 commits
    • Eric Blake's avatar
      nbd/client: Send NBD_CMD_DISC if open fails after connect · c688e6ca
      Eric Blake authored
      
      
      If nbd_client_init() fails after we are already connected,
      then the server will spam logs with:
      
      Disconnect client, due to: Unexpected end-of-file before all bytes were read
      
      unless we gracefully disconnect before closing the connection.
      
      Ways to trigger this:
      
      $ opts=driver=nbd,export=foo,server.type=inet,server.host=localhost,server.port=10809
      $  qemu-img map --output=json --image-opts $opts,read-only=off
      $  qemu-img map --output=json --image-opts $opts,x-dirty-bitmap=nosuch:
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20181130023232.3079982-4-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      c688e6ca
    • Eric Blake's avatar
      nbd/client: Make x-dirty-bitmap more reliable · 47829c40
      Eric Blake authored
      The implementation of x-dirty-bitmap in qemu 3.0 (commit 216ee365
      
      )
      silently falls back to treating the server as not supporting
      NBD_CMD_BLOCK_STATUS if a requested meta_context name was not
      negotiated, which in turn means treating the _entire_ image as
      data. Since our hack relied on using 'qemu-img map' to view
      which portions of the image were dirty by seeing what the
      redirected bdrv_block_status() treats as holes, this means
      that our fallback treats the entire image as clean.  Better
      would have been to treat the entire image as dirty, or to fail
      to connect because the user's request for a specific context
      could not be honored. This patch goes with the latter.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20181130023232.3079982-3-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      47829c40
    • Eric Blake's avatar
      nbd/server: Advertise all contexts in response to bare LIST · e31d8024
      Eric Blake authored
      The NBD spec, and even our code comment, says that if the client
      asks for NBD_OPT_LIST_META_CONTEXT with 0 queries, then we should
      reply with (a possibly-compressed representation of) ALL contexts
      that we are willing to let them try.  But commit 3d068aff
      
       forgot
      to advertise qemu:dirty-bitmap:FOO.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20181130023232.3079982-2-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      e31d8024
  6. 28 Nov, 2018 5 commits
  7. 27 Nov, 2018 6 commits