[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 4/9] proto.md: Document historic values for magics, reserve new value



On Fri, Jan 21, 2022 at 06:57:06PM +0100, Manfred Spraul wrote:
> From: Manfred Spraul <manfred.spraul@de.bosch.com>
> 
> Right now:
> - The historic values for NBD_REQUEST_MAGIC and NBD_REPLY_MAGIC are
>   just documented in nbd.h, without any background.
> - The new value that is now used for internal use by nbd-server is
>   not documented at all.
> 
> Resolve that:
> - Add all required information to proto.md.
> - Remove the reserved magic values from nbd.h: proto.md is the
>   authorative source, double storage doesn't help.
> 
> Signed-off-by: Manfred Spraul <manfred.spraul@de.bosch.com>
> ---
>  doc/proto.md | 12 ++++++++++++
>  nbd.h        |  1 -
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/proto.md b/doc/proto.md
> index 3a877a9..81ac755 100644
> --- a/doc/proto.md
> +++ b/doc/proto.md
> @@ -458,6 +458,18 @@ SHOULD wait until there are no inflight requests first.
>  The client and the server MUST NOT initiate any form
>  of disconnect other than in one of the above circumstances.
>  
> +#### Reserved Magic values
> +
> +The following magic values are reserved and must not be used
> +for future protocol extentions:

extensions

> +
> +0x12560953 - Historic value for NBD_REQUEST_MAGIC, used
> +	     until Linux 2.1.116pre2.
> +0x96744668 - Historic value for NBD_REPLY_MAGIC, used
> +	     until Linux 2.1.116pre2.
> +0x25609514 - Used by nbd-server to store data log flags in the
> +	     transaction log. Never sent from/to a client.
> +

Seems reasonable to me.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply to: