search for: 9bb165b

Displaying 4 results from an estimated 4 matches for "9bb165b".

2019 Jun 18
0
[libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...error == 0 && cmd->type == NBD_CMD_READ) { h->rbuf = cmd->data; h->rlen = cmd->count; + cmd->data_seen = true; SET_NEXT_STATE (%RECV_READ_PAYLOAD); } else { diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 9bb165b..6740400 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -269,6 +269,7 @@ return -1; } assert (cmd->data); + cmd->data_seen = true; /* Length of the data following. */ length -= 8; @@ -331,6 +332,7 @@ return -...
2019 Jun 20
1
Re: [libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...D_CMD_READ) { > h->rbuf = cmd->data; > h->rlen = cmd->count; > + cmd->data_seen = true; > SET_NEXT_STATE (%RECV_READ_PAYLOAD); > } > else { > diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c > index 9bb165b..6740400 100644 > --- a/generator/states-reply-structured.c > +++ b/generator/states-reply-structured.c > @@ -269,6 +269,7 @@ > return -1; > } > assert (cmd->data); > + cmd->data_seen = true; > > /* Length of the data following. */ >...
2019 Jun 18
0
[libnbd PATCH 2/8] states: Consolidate search for current reply's command
...cmd); + assert (cmd->handle == handle); if (cmd->type == NBD_CMD_READ && h->structured_replies) { set_error (0, "server sent unexpected simple reply for read"); diff --git a/generator/states-reply-structured.c b/generator/states-reply-structured.c index 2125e41..9bb165b 100644 --- a/generator/states-reply-structured.c +++ b/generator/states-reply-structured.c @@ -43,7 +43,7 @@ return 0; REPLY.STRUCTURED_REPLY.CHECK: - struct command_in_flight *cmd; + struct command_in_flight *cmd = h->reply_cmd; uint16_t flags, type; uint64_t handle; uint32_t l...
2019 Jun 18
17
[libnbd PATCH 0/8] Add nbd_pread_callback
I've mentioned this topic before (in fact, the idea of adding NBD_CMD_FLAG_DF was first mentioned at [1]), but finally finished enough of an implementation to feel confident in posting it. I'd still like to add something under examples/ that uses the new API to implement strict checking of a server's structured replies read implementation (ensure that a server never sends data after