Displaying 3 results from an estimated 3 matches for "7fb0fdf".
2019 Jun 20
1
Re: [libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...length -= 8;
> @@ -331,6 +332,7 @@
> return -1;
> }
> assert (cmd->data);
> + cmd->data_seen = true;
>
> /* Is the data within bounds? */
> if (offset < cmd->offset) {
> diff --git a/lib/aio.c b/lib/aio.c
> index 52e8892..7fb0fdf 100644
> --- a/lib/aio.c
> +++ b/lib/aio.c
> @@ -73,6 +73,8 @@ nbd_unlocked_aio_command_completed (struct nbd_handle *h,
>
> type = cmd->type;
> error = cmd->error;
> + if (type == NBD_CMD_READ && !cmd->data_seen && !error)
> + error = EIO...
2019 Jun 18
0
[libnbd PATCH 3/8] pread: Reject server SR read response with no data chunks
...= true;
/* Length of the data following. */
length -= 8;
@@ -331,6 +332,7 @@
return -1;
}
assert (cmd->data);
+ cmd->data_seen = true;
/* Is the data within bounds? */
if (offset < cmd->offset) {
diff --git a/lib/aio.c b/lib/aio.c
index 52e8892..7fb0fdf 100644
--- a/lib/aio.c
+++ b/lib/aio.c
@@ -73,6 +73,8 @@ nbd_unlocked_aio_command_completed (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 fre...
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