stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Stable Tree Mailing List <stable@vger.kernel.org>
Subject: Re: [PATCH] nfsd/blocklayout: accept any minlength
Date: Mon, 12 Oct 2015 16:18:15 -0400	[thread overview]
Message-ID: <20151012201815.GK28755@fieldses.org> (raw)
In-Reply-To: <20151011130821.GC3726@lst.de>

On Sun, Oct 11, 2015 at 03:08:22PM +0200, Christoph Hellwig wrote:
> On Fri, Oct 09, 2015 at 04:04:38PM -0400, J. Bruce Fields wrote:
> > I had some ideas that layouts were something a server could decline just
> > on random whim.  Rereading that section.... OK, looks like I was
> > confused, TRYLATER is the closest we come to random whim.
> > 
> > So the following condition on the alignments of the offset also looks
> > wrong.  Christoph, should it be rounding the offset down instead of
> > rejecting in that case?
> 
> RFC5663 is very explicit about the extents being aligned, but doesn't
> say anything about LAYOUTGET requests.  It's a bit of a gray area, but
> I think not handing out a layout is still the best thing to do as a client
> has to be really confused to ask for an unaligned layout and expect to get
> an aligned extent back.

http://tools.ietf.org/html/rfc5661#section-18.43.3 always allows a
server to round down the offset, is there any downside to doing that?

> I just need to check for the best possible error value.

INVAL or BADLAYOUT, I guess.  But just rounding down seems harmless and
compatible with the letter of the spec.

Though without any reason or a client to request an unaligned offset I
guess it's a bit academic.

--b.

> 
> > And other layoutunavailable cases might need review too.
> 
> Will do.

  reply	other threads:[~2015-10-12 20:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 13:03 [PATCH] nfsd/blocklayout: accept any minlength Christoph Hellwig
2015-10-09 15:28 ` J. Bruce Fields
2015-10-09 17:04   ` Christoph Hellwig
2015-10-09 17:45     ` J. Bruce Fields
2015-10-09 17:54       ` Trond Myklebust
2015-10-09 20:04         ` J. Bruce Fields
2015-10-09 20:14           ` J. Bruce Fields
2015-10-11 13:08           ` Christoph Hellwig
2015-10-12 20:18             ` J. Bruce Fields [this message]
2015-10-11 13:03       ` Christoph Hellwig

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=20151012201815.GK28755@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).