Skip to content
Snippets Groups Projects
  • Eric Blake's avatar
    b2578459
    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
    History
    nbd: Prepare for 64-bit request effect lengths
    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>