OSDN Git Service

nbd: Prepare for 64-bit request effect lengths
authorEric Blake <eblake@redhat.com>
Tue, 29 Aug 2023 17:58:31 +0000 (12:58 -0500)
committerEric Blake <eblake@redhat.com>
Mon, 25 Sep 2023 13:35:06 +0000 (08:35 -0500)
commitb2578459323c56002b360f5fc02188be7f5ca4db
tree6914af3f76c19772b9e8b5833843c3515cac5873
parentd95ffb6fe6008c114602e20d848100081d62f7aa
nbd: Prepare for 64-bit request effect lengths

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: Eric Blake <eblake@redhat.com>
Message-ID: <20230829175826.377251-23-eblake@redhat.com>
[eblake: fix assertion bug in nbd_co_send_simple_reply]
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
block/nbd.c
block/trace-events
include/block/nbd.h
nbd/client.c
nbd/server.c
nbd/trace-events