Re: [nfsv4] [pnfs] [PATCH 1/1] pnfsd: DLM file layout only support read iomode layouts

"J. Bruce Fields" <bfields@fieldses.org> Wed, 16 December 2009 15:37 UTC

Return-Path: <bfields@fieldses.org>
X-Original-To: nfsv4@core3.amsl.com
Delivered-To: nfsv4@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id CE1E63A692E for <nfsv4@core3.amsl.com>; Wed, 16 Dec 2009 07:37:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rj8pqOBM+eNx for <nfsv4@core3.amsl.com>; Wed, 16 Dec 2009 07:37:50 -0800 (PST)
Received: from fieldses.org (fieldses.org [174.143.236.118]) by core3.amsl.com (Postfix) with ESMTP id 0B51F3A6825 for <nfsv4@ietf.org>; Wed, 16 Dec 2009 07:37:50 -0800 (PST)
Received: from bfields by fieldses.org with local (Exim 4.69) (envelope-from <bfields@fieldses.org>) id 1NKvwa-00065C-Dc; Wed, 16 Dec 2009 10:37:40 -0500
Date: Wed, 16 Dec 2009 10:37:40 -0500
From: "J. Bruce Fields" <bfields@fieldses.org>
To: "William A. (Andy) Adamson" <androsadamson@gmail.com>
Message-ID: <20091216153740.GA23117@fieldses.org>
References: <1260907434-7484-1-git-send-email-andros@netapp.com> <1260907434-7484-2-git-send-email-andros@netapp.com> <20091215224155.GF8686@fieldses.org> <4B28D006.4000409@panasas.com> <89c397150912160726l65469d9nb3df68d06fdc190d@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <89c397150912160726l65469d9nb3df68d06fdc190d@mail.gmail.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
Cc: Benny Halevy <bhalevy@panasas.com>, pnfs@linux-nfs.org, NFSv4 <nfsv4@ietf.org>
Subject: Re: [nfsv4] [pnfs] [PATCH 1/1] pnfsd: DLM file layout only support read iomode layouts
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nfsv4>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 16 Dec 2009 15:37:50 -0000

On Wed, Dec 16, 2009 at 10:26:57AM -0500, William A. (Andy) Adamson wrote:
> On Wed, Dec 16, 2009 at 7:18 AM, Benny Halevy <bhalevy@panasas.com> wrote:
> >
> > 15.1.10.4.  NFS4ERR_LAYOUTUNAVAILABLE (Error Code 10059)
> >
> >   Returned when layouts are not available for the current file system
> >   or the particular specified file.
> >
> > NFS4ERR_BADIOMODE seems to make more sense since layouts are available,
> > just not for the requested iomode. However its definition indicates that
> > the iomode in the client request is "invalid or inappropriate".
> > It is not clear what "inappropriate" means in this context.
> 
> What difference does 'what inappropriate means' make to the client?
> None! It's up to the server.

We do have to worry how clients will react to the error:

	- If clients really assume that this error can only result from
	  a bug, then they may choose to return an IO error to the
	  application, turn off pnfs entirely for this server, or
	  something similarly drastic.

	- If they assume it means that the server doesn't feel like
	  giving out a layout of that iomode right now, then we're good.

You're probably right that the latter is a reasonable interpretation of
"inappropriate".

However, the spec isn't entirely explicit about this, and the only
specific example given of BADIOMODE use is an "invalid" case (client
supplying IOMODE4_ANY on getlayout), so I think it would be easy for a
client to get this wrong.

--b.