search for: chunk_reply

Displaying 5 results from an estimated 5 matches for "chunk_reply".

Did you mean: check_reply
2023 Jun 09
4
[libnbd PATCH v4 0/4] Saner reply header layout
This was v3 patch 2/22, reworked to address the confusion about how a structured reply header is read in two pieces before getting to the payload portion. I'm still working on rebasing the rest of my v3 series (patches 1, 3-22) from other comments given, but this seemed independent enough that it's worth posting now rather than holding it up for the rest of the series. Eric Blake (4):
2023 Jun 20
1
[libnbd PATCH v4 4/4] internal: Refactor layout of replies in sbuf
...= h->cmds_in_flight, prev_cmd = NULL; > cmd != NULL; > diff --git a/generator/states-reply-chunk.c b/generator/states-reply-chunk.c > index 94f3a8ae..c42741fb 100644 > --- a/generator/states-reply-chunk.c > +++ b/generator/states-reply-chunk.c > @@ -50,9 +50,9 @@ REPLY.CHUNK_REPLY.START: > uint16_t flags, type; > uint32_t length; > > - flags = be16toh (h->sbuf.sr.structured_reply.flags); > - type = be16toh (h->sbuf.sr.structured_reply.type); > - length = be32toh (h->sbuf.sr.structured_reply.length); > + flags = be16toh (h->sbuf.rep...
2023 Jul 16
1
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
...ut when you mix non-default settings (using nbd_set_strict to disable STRICT_COMMANDS) to send a block status without having negotiated it, coupled with a non-compliant server that responds with status anyways, we can then hit the assertion failure where h->meta_valid is not set during the REPLY.CHUNK_REPLY.RECV_BS_ENTRIES state. Demonstration of the assertion failure can be done with a quick patch to nbdkit (here, on top of v1.35.6): | diff --git i/server/protocol.c w/server/protocol.c | index cb530e65..6b115d99 100644 | --- i/server/protocol.c | +++ w/server/protocol.c | @@ -190,7 +190,7 @@ valida...
2023 Jul 16
2
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
...lt settings > (using nbd_set_strict to disable STRICT_COMMANDS) to send a block > status without having negotiated it, coupled with a non-compliant > server that responds with status anyways, we can then hit the > assertion failure where h->meta_valid is not set during the > REPLY.CHUNK_REPLY.RECV_BS_ENTRIES state. > > Demonstration of the assertion failure can be done with a quick patch > to nbdkit (here, on top of v1.35.6): > > | diff --git i/server/protocol.c w/server/protocol.c > | index cb530e65..6b115d99 100644 > | --- i/server/protocol.c > | +++ w/server...
2023 Aug 04
2
[libnbd PATCH v4 01/25] block_status: Add some sanity checking of server lengths
...- > 1 file changed, 58 insertions(+), 20 deletions(-) > > diff --git a/generator/states-reply-chunk.c b/generator/states-reply-chunk.c > index 17bb5149..735f9456 100644 > --- a/generator/states-reply-chunk.c > +++ b/generator/states-reply-chunk.c > @@ -461,6 +461,11 @@ REPLY.CHUNK_REPLY.RECV_BS_ENTRIES: > struct command *cmd = h->reply_cmd; > size_t i; > uint32_t context_id; > + int error; > + const char *name; > + uint32_t orig_len, len, flags; > + uint64_t total, cap; > + bool stop; > > switch (recv_into_rbuf (h)) { > case...