search for: 369df0f

Displaying 3 results from an estimated 3 matches for "369df0f".

2019 Jun 14
0
[libnbd PATCH 6/7] states: Give up on oversized reply length
...t to truncate before sending that large of a chunk. --- generator/states-newstyle.c | 7 +++++-- generator/states-reply-structured.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index e86282b..369df0f 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -64,9 +64,12 @@ prepare_for_reply_payload (struct nbd_handle *h, uint32_t opt) /* Read the following payload if it is short enough to fit in the * static buffer. If it's too long, skip it. */ - /* XXX Mov...
2019 Jun 14
0
[libnbd PATCH 7/7] states: Capture NBD_REP_ERR message
...handle_reply_error (h) == -1) { + SET_NEXT_STATE (%.DEAD); + return -1; + } + debug (h, "structured replies are not supported by this server"); h->structured_replies = false; break; diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index 369df0f..8a4eec6 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -77,6 +77,35 @@ prepare_for_reply_payload (struct nbd_handle *h, uint32_t opt) return 0; } +/* Check an unexpected server reply. If it is an error, log any + * message from the server and return 0; otherwise...
2019 Jun 14
10
[libnbd PATCH 0/7] state machine refactoring
I'm still playing with ideas on how to split rstate from wstate (so that we can send a request without waiting for POLLIN to complete a pending reply), but this is some preliminary refactoring I found useful. I also fixed a couple of bugs while in the area (already pushed). There's a question of whether we want nbd_handle to be nearly 5k, or if we should instead keep it small and add one