Re: [Nbd] [PATCH] add support for NBD_CMD_TRIM, update docs
- To: Alex Bligh <alex@...872...>
- Cc: nbd-general@lists.sourceforge.net, Paolo Bonzini <pbonzini@...696...>
- Subject: Re: [Nbd] [PATCH] add support for NBD_CMD_TRIM, update docs
- From: Wouter Verhelst <w@...112...>
- Date: Thu, 8 Sep 2011 18:32:04 +0200
- Message-id: <20110908163204.GC22384@...3...>
- In-reply-to: <5DD2D65F71A12129C276FDE5@...874...>
- References: <1315476346-7155-1-git-send-email-pbonzini@...696...> <5DD2D65F71A12129C276FDE5@...874...>
On Thu, Sep 08, 2011 at 05:17:45PM +0100, Alex Bligh wrote:
> Paolo,
>
> Thanks for this. Do you have as server implementation of TRIM? I might
> have a go if not.
>
> One comment below:
>
> > @@ -77,8 +80,7 @@ description of the data that is sent.
> > S: "NBDMAGIC" (the INIT_PASSWD in the code)
> > S: 0x00420281861253 (cliserv_magic, a magic number)
> > S: size of the export in bytes, 64 bit unsigned int
> > -S: flags, 4 bytes (may have the NBD_FLAG_READ_ONLY flag set if the
> > - export is read-only; the rest is reserved)
> > +S: flags, 4 bytes
> > S: 124 bytes of zeroes (registered for future use, yes this is
> > excessive).
> >
> > @@ -140,8 +142,7 @@ Once all options are set, the server replies with
> > information about the used export:
> >
> > S: size of the export in bytes, 64 bit unsigned int
> > -S: flags (16 bits unsigned int, may contain NBD_FLAG_READ_ONLY if the
> > - export is read-only)
> > +S: flags (16 bits unsigned int)
> > S: 124 bytes of zeroes (forgot to remove that, oops)
>
> I'm confused about these change. Mind you I'm confused about most of the
> READ_ONLY stuff as the original implementation did not appear to work :-)
Basically, it removes the confusing mention of READ_ONLY stuff in the
flags field in proto.txt, and replaces it with a more detailed and
correct description of all the possible flags. It's perfectly okay :-)
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: