Re: Allowing > 32 bit lengths for NBD_CMD_TRIM, NBD_CMD_WRITE_ZEROES
- To: "Richard W.M. Jones" <rjones@redhat.com>
- Cc: nbd@other.debian.org
- Subject: Re: Allowing > 32 bit lengths for NBD_CMD_TRIM, NBD_CMD_WRITE_ZEROES
- From: Wouter Verhelst <w@uter.be>
- Date: Tue, 2 Oct 2018 12:45:23 +0200
- Message-id: <[🔎] 20181002104523.GB10111@grep.be>
- In-reply-to: <20180918072350.GA2956@grep.be>
- References: <20180904084713.GA17471@redhat.com> <20180906105549.GB4929@grep.be> <20180906111323.GD17471@redhat.com> <20180918072350.GA2956@grep.be>
Hi,
So, since no further discussion was happening on this, I created a new
branch with proposed language for formalizing this format:
https://github.com/NetworkBlockDevice/nbd/compare/extension-structured-request
It's not complete yet (there still needs to be a number assigned for
NBD_OPT_STRUCTURED_REQUEST), but I think that's fine.
As regards padding:
On Tue, Sep 18, 2018 at 09:23:50AM +0200, Wouter Verhelst wrote:
> So that would make the format be like this:
>
> - magic (32)
> - request length (64)
> - header length (8)
I ended up adding 24 bits of padding here...
> - flags (16)
> - command (16)
> - from (64)
> - affected length (64)
>
> Would it make sense to introduce more padding so that 64-bit values
> are 64-bit aligned?
>
> That would be:
>
> - magic (32)
> - header length (8)
> - padding (24)
> - flags (16)
> - command (16)
> - padding (32)
> - request length (64)
> - from (64)
> - affected length (64)
... but didn't go this way.
Comments, anyone?
--
Could you people please use IRC like normal people?!?
-- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
Hacklab
Reply to: