[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/18] nbd: Detect servers that send unexpected
From: |
Alex Bligh |
Subject: |
Re: [Qemu-devel] [PATCH 04/18] nbd: Detect servers that send unexpected error values |
Date: |
Sat, 9 Apr 2016 11:31:19 +0100 |
On 8 Apr 2016, at 23:05, Eric Blake <address@hidden> wrote:
> Add some debugging to flag servers that are not compliant to
> the NBD protocol.
>
> Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Alex Bligh <address@hidden>
> ---
> nbd/client.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/nbd/client.c b/nbd/client.c
> index 42e4e52..c834587 100644
> --- a/nbd/client.c
> +++ b/nbd/client.c
> @@ -33,8 +33,10 @@ static int nbd_errno_to_system_errno(int err)
> return ENOMEM;
> case NBD_ENOSPC:
> return ENOSPC;
> + default:
> + TRACE("Squashing unexpected error %d to EINVAL", err);
> + /* fallthrough */
> case NBD_EINVAL:
> - default:
> return EINVAL;
> }
> }
> --
> 2.5.5
>
>
--
Alex Bligh
- [Qemu-devel] [RFC PATCH 00/18] NBD protocol additions, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 05/18] nbd: Reject unknown request flags, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 04/18] nbd: Detect servers that send unexpected error values, Eric Blake, 2016/04/08
- Re: [Qemu-devel] [PATCH 04/18] nbd: Detect servers that send unexpected error values,
Alex Bligh <=
- [Qemu-devel] [PATCH 03/18] nbd: More debug typo fixes, use correct formats, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 09/18] nbd: Share common reply-sending code in server, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 02/18] nbd: Don't fail handshake on NBD_OPT_LIST descriptions, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 14/18] nbd: Implement NBD_OPT_GO on client, Eric Blake, 2016/04/08
- [Qemu-devel] [PATCH 10/18] nbd: Share common option-sending code in client, Eric Blake, 2016/04/08