Displaying 4 results from an estimated 4 matches for "6fde06c".
2019 Jun 18
0
[libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...mpleted (struct nbd_handle *h,
type = cmd->type;
error = cmd->error;
+ if (type == NBD_CMD_READ && !cmd->data_seen && !error)
+ error = EIO;
/* Retire it from the list and free it. */
if (prev_cmd != NULL)
diff --git a/lib/internal.h b/lib/internal.h
index 6fde06c..1f8f789 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -242,6 +242,7 @@ struct command_in_flight {
uint32_t count;
void *data; /* Buffer for read/write, opaque for block status */
extent_fn extent_fn;
+ bool data_seen; /* For read, true if at least one data chunk seen */
uint32_t...
2019 Jun 20
1
Re: [libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...= cmd->type;
> error = cmd->error;
> + if (type == NBD_CMD_READ && !cmd->data_seen && !error)
> + error = EIO;
>
> /* Retire it from the list and free it. */
> if (prev_cmd != NULL)
> diff --git a/lib/internal.h b/lib/internal.h
> index 6fde06c..1f8f789 100644
> --- a/lib/internal.h
> +++ b/lib/internal.h
> @@ -242,6 +242,7 @@ struct command_in_flight {
> uint32_t count;
> void *data; /* Buffer for read/write, opaque for block status */
> extent_fn extent_fn;
> + bool data_seen; /* For read, true if at least...
2019 Jun 18
0
[libnbd PATCH 2/8] states: Consolidate search for current reply's command
...prev_cmd, *cmd;
uint64_t handle;
@@ -102,6 +127,8 @@
break;
}
assert (cmd != NULL);
+ assert (h->reply_cmd == cmd);
+ h->reply_cmd = NULL;
/* Move it to the end of the cmds_done list. */
if (prev_cmd != NULL)
diff --git a/lib/internal.h b/lib/internal.h
index 9404d65..6fde06c 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -189,6 +189,8 @@ struct nbd_handle {
* acknowledge them.
*/
struct command_in_flight *cmds_to_issue, *cmds_in_flight, *cmds_done;
+ /* Current command during a REPLY cycle */
+ struct command_in_flight *reply_cmd;
};
struct meta_co...
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