Re: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store

Chuck Lever <chuck.lever@oracle.com> Thu, 08 July 2010 18:43 UTC

Return-Path: <chuck.lever@oracle.com>
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 DF31E3A635F for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 11:43:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.995
X-Spam-Level:
X-Spam-Status: No, score=-5.995 tagged_above=-999 required=5 tests=[AWL=0.603, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 dUVTpIaY+zDX for <nfsv4@core3.amsl.com>; Thu, 8 Jul 2010 11:43:03 -0700 (PDT)
Received: from rcsinet10.oracle.com (rcsinet10.oracle.com [148.87.113.121]) by core3.amsl.com (Postfix) with ESMTP id EAE413A67F4 for <nfsv4@ietf.org>; Thu, 8 Jul 2010 11:43:02 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o68Ih6vZ007954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <nfsv4@ietf.org>; Thu, 8 Jul 2010 18:43:07 GMT
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o68Ih3Cr029806 for <nfsv4@ietf.org>; Thu, 8 Jul 2010 18:43:04 GMT
Received: from abhmt005.oracle.com by acsmt355.oracle.com with ESMTP id 410337861278614517; Thu, 08 Jul 2010 11:41:57 -0700
Received: from [141.144.6.228] (/141.144.6.228) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Jul 2010 11:41:57 -0700
Message-ID: <4C361BED.2020903@oracle.com>
Date: Thu, 08 Jul 2010 14:41:49 -0400
From: Chuck Lever <chuck.lever@oracle.com>
Organization: Oracle USA
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100607 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: Nicolas Williams <Nicolas.Williams@oracle.com>
References: <4C35F555.1060604@oracle.com> <20100708174228.GG17986@oracle.com>
In-Reply-To: <20100708174228.GG17986@oracle.com>
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4C361C39.0328:SCFMA4539814,ss=1,fgs=0
Cc: nfsv4@ietf.org
Subject: Re: [nfsv4] [FedFS] proposed ADMIN protocol procedure to enumerate server's NSDB store
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: Thu, 08 Jul 2010 18:43:04 -0000

On 07/ 8/10 01:42 PM, Nicolas Williams wrote:
> On Thu, Jul 08, 2010 at 11:57:09AM -0400, Chuck Lever wrote:
>>     union FedFsGetNsdbNamesRes switch (FedFsStatus status) {
>>      case FEDFS_OK:
>>             FedFsGetNsdbNamesResOk   resok;
>>      case FEDFS_ERR_NSDB_TOO_SMALL:
>>             FedFsGetNsdbNamesResTS   restoosmall;
>>      default:
>>             void;
>>     };
>>
>>       ...
>>
>>     FEDFS_ERR_NSDB_PARAMS  The fileserver does not have any connection
>>        parameters on record for the specified NSDB.
>>
>>     FEDFS_ERR_NSDB_NOT_SAME  The cookie/verifier pair passed in a
>>        FEDFS_GET_NSDB_NAMES request is no longer valid.
>
> NOT_SAME seems insufficiently descriptive.  How about
> FEDFS_ERR_NSDB_INVALID_COOKIE?

Following the precedent set by the authors of the ADMIN protocol draft, 
I appropriated NOT_SAME from 5661's READDIR procedure.

>>     FEDFS_ERR_NSDB_TOO_SMALL  The caller specified a maxcount that is
>>        not large enough to hold the next FedFsNsdbName in a
>>        FEDFS_GET_NSDB_NAMES result
>>
>>    ...
>>     The maxcount field is a hint of the maximum number of bytes of NSDB
>>     information that should be returned in the reply.  This value
>>     represents the total length of NSDB names, after XDR encoding, and
>>     not the length of the native format of the NSDB names on the ADMIN
>>     server.  If the server is unable to fit a single name within the
>>     maxcount limit, the error FEDFS_ERR_NSDB_TOO_SMALL MUST be returned.
>>     The number of XDR bytes needed to return the next name MUST be placed
>>     in the reply's maxcount field.  The server also returns a
>>     cookie/verifier pair that is needed to read this value (usually
>>     unchanged from the previous failed FEDFS_GET_NSDB_NAMES request).
>
> Why should one tell the server a max reply size instead of a max number
> of NSDBs whose params to return?

Because there is no limit on the size of a single NSDB name.

> Why shouldn't the server decide how many NSDBs to list in a single RPC
> result instead?

The receiving end (the client) may have limited space to receive NSDB 
name information.