search for: 935f6d2

Displaying 6 results from an estimated 6 matches for "935f6d2".

2019 Jun 18
0
[libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...nerator/states-reply-simple.c | 1 + generator/states-reply-structured.c | 2 ++ lib/aio.c | 2 ++ lib/internal.h | 1 + 4 files changed, 6 insertions(+) diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c index 12536e0..935f6d2 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -40,6 +40,7 @@ if (cmd->error == 0 && cmd->type == NBD_CMD_READ) { h->rbuf = cmd->data; h->rlen = cmd->count; + cmd->data_seen = true; SET_NEXT_STATE (%RECV_READ_P...
2019 Jun 18
0
[libnbd PATCH 5/8] states: Wire in a read callback
...t;, 1 lsl 3; + + "READ_DATA", 1; + "READ_HOLE", 2; + "READ_ERROR", 3; ] (*----------------------------------------------------------------------*) diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c index 935f6d2..ddc91ce 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -49,9 +49,22 @@ return 0; REPLY.SIMPLE_REPLY.RECV_READ_PAYLOAD: + struct command_in_flight *cmd = h->reply_cmd; + switch (recv_into_rbuf (h)) { case -1: SET_NEXT_STATE (%.DEAD); return -1;...
2019 Jun 21
0
[libnbd PATCH v2 2/5] states: Wire in a read callback
...t;, 1 lsl 3; + + "READ_DATA", 1; + "READ_HOLE", 2; + "READ_ERROR", 3; ] (*----------------------------------------------------------------------*) diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c index 935f6d2..87622a0 100644 --- a/generator/states-reply-simple.c +++ b/generator/states-reply-simple.c @@ -49,9 +49,22 @@ return 0; REPLY.SIMPLE_REPLY.RECV_READ_PAYLOAD: + struct command_in_flight *cmd = h->reply_cmd; + switch (recv_into_rbuf (h)) { case -1: SET_NEXT_STATE (%.DEAD); return -1;...
2019 Jun 20
1
Re: [libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...1 + > generator/states-reply-structured.c | 2 ++ > lib/aio.c | 2 ++ > lib/internal.h | 1 + > 4 files changed, 6 insertions(+) > > diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c > index 12536e0..935f6d2 100644 > --- a/generator/states-reply-simple.c > +++ b/generator/states-reply-simple.c > @@ -40,6 +40,7 @@ > if (cmd->error == 0 && cmd->type == NBD_CMD_READ) { > h->rbuf = cmd->data; > h->rlen = cmd->count; > + cmd->data_seen = true...
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
2019 Jun 21
9
[libnbd PATCH v2 0/5] nbd_pread_structured
Since v1: - rebase to applied patches - split out support for Int in callbacks - sort of test that callbacks work in OCaml (see comment in patch 5) - rename API to nbd_pread_structured - expose error as explicit parameter to callback Eric Blake (5): generator: Allow Int in callbacks states: Wire in a read callback states: Add nbd_pread_structured API states: Add tests for