All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Justin T. Gibbs" <justing@spectralogic.com>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 2 of 4 v3] blkif.h: Provide more complete documentation of the blkif interface
Date: Tue, 21 Feb 2012 16:36:23 -0500	[thread overview]
Message-ID: <20120221213623.GB28154@phenom.dumpdata.com> (raw)
In-Reply-To: <D73CB6D0-8D1E-4CD1-AF33-58FDDA77EA28@spectralogic.com>

On Tue, Feb 21, 2012 at 01:59:15PM -0700, Justin T. Gibbs wrote:
> On Feb 21, 2012, at 7:10 AM, Konrad Rzeszutek Wilk wrote:
> 
> > On Mon, Feb 20, 2012 at 11:07:23AM -0700, Justin T. Gibbs wrote:
> >>  o Document the XenBus nodes used in this protocol.
> >>  o Add a state diagram illustrating the roles and responsibilities
> >>    of both the front and backend during startup.
> >>  o Correct missed BLKIF_OP_TRIM => BLKIF_OP_DISCARD conversion in a comment.
> >> 
> >> No functional changes.
> > 
> > Some comments below.
> 
> …
> 
> >> + *------------------------- Backend Device Properties -------------------------
> >> + *
> >> + * discard-aligment
> >> + *      Values:         <uint32_t>
> >> + *      Default Value:  0
> >> + *      Notes:          1, 2
> >> + *
> >> + *      The offset, in bytes from the beginning of the virtual block device,
> >> + *      to the first, addressable, discard extent on the underlying device.
> > 
> > You are also missing the rest of the information about it. Please include the
> > details that the previous comment had.
> 
> The strategy I have employed in all of this documentation is to
> treat blkif.h as a formal spec.  This means that blkif needs to

OK.
> describe how its terminology maps to industry standards (e.g. discard
> means trim/unmap) and how these requests can be communicated between
> front and back driver.  It should not, in my opinion, attempt to
> document information that is managed in other specs (e.g. T10/T13)
> and could easily become stale in blkif.h.  It also should avoid
> stating information that someone reasonably proficient in writing
> (storage) device drivers is expected to know (e.g. don't say you
> support something that you don't).

And that is what I hate about specs. They don't provide enough details
on the corner cases or what an implentation could look like.

> 
> With that in mind, I believe that all of the required information
> about discard is still present in blkif.h, but perhaps presented
> differently or moved to different sections.  Can you be more
> specific about the information that you feel is missing here and
> in the other places you noted below?

The original statement about how the backend would determine how
to expose this information.

> 
> >> + *
> >> + * discard-secure
> >> + *      Values:         0/1 (boolean)
> >> + *      Default Value:  0
> >> + *
> >> + *      A value of "1" indicates that the backend can process BLKIF_OP_DISCARD
> >> + *      requests with the BLKIF_DISCARD_SECURE flag set.
> > 
> > 
> > That is not very specific to what this does. It just says X will do Y.
> 
> Did you mean, "That is not very specific to what BLKIF_DISCARD_SECURE
> does."?  BLKIF_DISCARD_SECURE is documented in the comment section
> for BLKIF_OP_DISCARD.  The pertinent text is: "If  the BLKIF_DISCARD_SECURE
> flag is set on the request, all copies of the discarded region on
> the device must be rendered unrecoverable before the command returns."
> Is there a compelling reason to document it here instead?

I just think that having more information (even duplicate) is
better. But that has the disadvantage that it can get out of sync.

> 
> The comment block here mirrors the language of all the other feature
> flags.  Do you believe they should be changed in some way too?

Well, the desire (mine) is to include as much details (or even more) in the
spec so that it can be read as a novel if desired.

But I will defer to Ian - if he is OK then this shouldn't gate
the acceptance of this patch which is a step forward.

.. snip..
> >> + * command on a native device.
> > 
> > And you might want to mention what the previous comment did - that this is
> > a hint to the backend.
> 
> The proposed text already does this:
> 
>     "Indicate to the backend device that a region of storage is no
>      longer in use, and may be discarded at any time without impact
>      to the client."
> 
> If the backend was required to discard the region, I would have
> used "shall" or "must", not "may".  This is the typical language
> convention of standards documents.

Fair enough.

> 
> --
> Justin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2012-02-21 21:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 18:07 [PATCH 0 of 4 v3] blkif.h: Document protocol and existing extensions Justin T. Gibbs
2012-02-20 18:07 ` [PATCH 1 of 4 v3] blkif.h: Miscelaneous style fixes Justin T. Gibbs
2012-02-21 14:10   ` Konrad Rzeszutek Wilk
2012-02-21 14:15   ` Ian Campbell
2012-02-20 18:07 ` [PATCH 2 of 4 v3] blkif.h: Provide more complete documentation of the blkif interface Justin T. Gibbs
2012-02-21 14:10   ` Konrad Rzeszutek Wilk
2012-02-21 20:59     ` Justin T. Gibbs
2012-02-21 21:36       ` Konrad Rzeszutek Wilk [this message]
2012-02-22 11:14         ` Ian Campbell
2012-02-23 18:50           ` Konrad Rzeszutek Wilk
2012-02-23 22:41             ` Justin T. Gibbs
2012-02-21 14:27   ` Ian Campbell
2012-02-21 18:14     ` Justin T. Gibbs
2012-02-21 19:41       ` Ian Campbell
2012-02-20 18:07 ` [PATCH 3 of 4 v3] blkif.h: Document the RedHat and Citrix blkif multi-page ring extensions Justin T. Gibbs
2012-02-21 14:12   ` Konrad Rzeszutek Wilk
2012-02-21 14:32   ` Ian Campbell
2012-02-20 18:07 ` [PATCH 4 of 4 v3] blkif.h: Define and document the request number/size/segments extension Justin T. Gibbs
2012-02-21 14:22   ` Konrad Rzeszutek Wilk
2012-02-21 18:11     ` Justin T. Gibbs
2012-02-21 14:38   ` Ian Campbell
2012-02-21 18:03     ` Justin T. Gibbs
2012-02-21 19:42       ` Ian Campbell
2012-02-21 14:02 ` [PATCH 0 of 4 v3] blkif.h: Document protocol and existing extensions Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120221213623.GB28154@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=justing@spectralogic.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.