Skip to content
Snippets Groups Projects
  1. Sep 25, 2023
    • Eric Blake's avatar
      nbd: Prepare for 64-bit request effect lengths · b2578459
      Eric Blake authored
      
      Widen the length field of NBDRequest to 64-bits, although we can
      assert that all current uses are still under 32 bits: either because
      of NBD_MAX_BUFFER_SIZE which is even smaller (and where size_t can
      still be appropriate, even on 32-bit platforms), or because nothing
      ever puts us into NBD_MODE_EXTENDED yet (and while future patches will
      allow larger transactions, the lengths in play here are still capped
      at 32-bit).  There are no semantic changes, other than a typo fix in a
      couple of error messages.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-ID: <20230829175826.377251-23-eblake@redhat.com>
      [eblake: fix assertion bug in nbd_co_send_simple_reply]
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      b2578459
  2. Sep 22, 2023
    • Eric Blake's avatar
      nbd: Add types for extended headers · d95ffb6f
      Eric Blake authored
      
      Add the constants and structs necessary for later patches to start
      implementing the NBD_OPT_EXTENDED_HEADERS extension in both the client
      and server, matching recent upstream nbd.git (through commit
      e6f3b94a934).  This patch does not change any existing behavior, but
      merely sets the stage for upcoming patches.
      
      This patch does not change the status quo that neither the client nor
      server use a packed-struct representation for the request header.
      While most of the patch adds new types, there is also some churn for
      renaming the existing NBDExtent to NBDExtent32 to contrast it with
      NBDExtent64, which I thought was a nicer name than NBDExtentExt.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-ID: <20230829175826.377251-22-eblake@redhat.com>
      d95ffb6f
    • Eric Blake's avatar
      nbd/client: Pass mode through to nbd_send_request · 297365b4
      Eric Blake authored
      
      Once the 64-bit headers extension is enabled, the data layout we send
      over the wire for a client request depends on the mode negotiated with
      the server.  Rather than adding a parameter to nbd_send_request, we
      can add a member to struct NBDRequest, since it already does not
      reflect on-wire format.  Some callers initialize it directly; many
      others rely on a common initialization point during
      nbd_co_send_request().  At this point, there is no semantic change.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-ID: <20230829175826.377251-21-eblake@redhat.com>
      297365b4
    • Eric Blake's avatar
      nbd: Replace bool structured_reply with mode enum · ac132d05
      Eric Blake authored
      
      The upcoming patches for 64-bit extensions requires various points in
      the protocol to make decisions based on what was negotiated.  While we
      could easily add a 'bool extended_headers' alongside the existing
      'bool structured_reply', this does not scale well if more modes are
      added in the future.  Better is to expose the mode enum added in the
      recent commit bfe04d0a out to a wider use in the code base.
      
      Where the code previously checked for structured_reply being set or
      clear, it now prefers checking for an inequality; this works because
      the nodes are in a continuum of increasing abilities, and allows us to
      touch fewer places if we ever insert other modes in the middle of the
      enum.  There should be no semantic change in this patch.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-ID: <20230829175826.377251-20-eblake@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      ac132d05
    • Denis V. Lunev's avatar
      iotests: improve 'not run' message for nbd-multiconn test · 71a5655a
      Denis V. Lunev authored
      
      The test actually requires Python bindings to libnbd rather than libnbd
      itself. Clarify that inside the message.
      
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Hanna Reitz <hreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-ID: <20230906140917.559129-3-den@openvz.org>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      71a5655a
    • Denis V. Lunev's avatar
      iotests: use TEST_IMG_FILE instead of TEST_IMG in _require_large_file · 0189c279
      Denis V. Lunev authored
      
      We need to check that we are able to create large enough file which is
      used as an export base rather than connection URL. Unfortunately, there
      are cases when the TEST_IMG_FILE is not defined. We should fallback to
      TEST_IMG in that case.
      
      This problem has been detected when running
          ./check -nbd 5
      The test should be able to run while it does not.
      
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Hanna Reitz <hreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
      Message-ID: <20230906140917.559129-2-den@openvz.org>
      Tested-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      0189c279
  3. Sep 21, 2023
Loading