From owner-svn-src-projects@FreeBSD.ORG Sat Feb 4 02:00:34 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5DB106566B; Sat, 4 Feb 2012 02:00:34 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CB6C8FC17; Sat, 4 Feb 2012 02:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1420YhC014239; Sat, 4 Feb 2012 02:00:34 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1420YqV014233; Sat, 4 Feb 2012 02:00:34 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201202040200.q1420YqV014233@svn.freebsd.org> From: Rick Macklem Date: Sat, 4 Feb 2012 02:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230973 - in projects/nfsv4.1-client/sys/fs: nfs nfsclient X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 02:00:34 -0000 Author: rmacklem Date: Sat Feb 4 02:00:33 2012 New Revision: 230973 URL: http://svn.freebsd.org/changeset/base/230973 Log: Add NFSPROC_WRITEDS to be used for a write to an NFSv4.1 Data Server (DS). This is needed, since NFSPROC_WRITE includes a Getattr operation and Getattr is not supported by a DS. Modified: projects/nfsv4.1-client/sys/fs/nfs/nfs_commonkrpc.c projects/nfsv4.1-client/sys/fs/nfs/nfs_commonsubs.c projects/nfsv4.1-client/sys/fs/nfs/nfsport.h projects/nfsv4.1-client/sys/fs/nfs/nfsproto.h projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clcomsubs.c Modified: projects/nfsv4.1-client/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfs/nfs_commonkrpc.c Sat Feb 4 00:54:43 2012 (r230972) +++ projects/nfsv4.1-client/sys/fs/nfs/nfs_commonkrpc.c Sat Feb 4 02:00:33 2012 (r230973) @@ -888,6 +888,7 @@ printf("foreslots growing %d\n", retval) nd->nd_procnum != NFSPROC_SETATTR && nd->nd_procnum != NFSPROC_READ && nd->nd_procnum != NFSPROC_WRITE && + nd->nd_procnum != NFSPROC_WRITEDS && nd->nd_procnum != NFSPROC_OPEN && nd->nd_procnum != NFSPROC_CREATE && nd->nd_procnum != NFSPROC_OPENCONFIRM && Modified: projects/nfsv4.1-client/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfs/nfs_commonsubs.c Sat Feb 4 00:54:43 2012 (r230972) +++ projects/nfsv4.1-client/sys/fs/nfs/nfs_commonsubs.c Sat Feb 4 02:00:33 2012 (r230973) @@ -168,7 +168,7 @@ static struct nfsuserlruhead nfsuserlruh */ int nfs_bigreply[NFSV41_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); Modified: projects/nfsv4.1-client/sys/fs/nfs/nfsport.h ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfs/nfsport.h Sat Feb 4 00:54:43 2012 (r230972) +++ projects/nfsv4.1-client/sys/fs/nfs/nfsport.h Sat Feb 4 02:00:33 2012 (r230973) @@ -348,11 +348,12 @@ #define NFSPROC_LAYOUTCOMMIT 48 #define NFSPROC_LAYOUTRETURN 49 #define NFSPROC_RECLAIMCOMPL 50 +#define NFSPROC_WRITEDS 51 /* * Must be defined as one higher than the last NFSv4.1 Proc# above. */ -#define NFSV41_NPROCS 51 +#define NFSV41_NPROCS 52 #endif /* NFS_V3NPROCS */ Modified: projects/nfsv4.1-client/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfs/nfsproto.h Sat Feb 4 00:54:43 2012 (r230972) +++ projects/nfsv4.1-client/sys/fs/nfs/nfsproto.h Sat Feb 4 02:00:33 2012 (r230973) @@ -314,11 +314,12 @@ #define NFSPROC_LAYOUTCOMMIT 48 #define NFSPROC_LAYOUTRETURN 49 #define NFSPROC_RECLAIMCOMPL 50 +#define NFSPROC_WRITEDS 51 /* * Must be defined as one higher than the last NFSv4.1 Proc# above. */ -#define NFSV41_NPROCS 51 +#define NFSV41_NPROCS 52 #endif /* NFS_V3NPROCS */ Modified: projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clcomsubs.c Sat Feb 4 00:54:43 2012 (r230972) +++ projects/nfsv4.1-client/sys/fs/nfsclient/nfs_clcomsubs.c Sat Feb 4 02:00:33 2012 (r230973) @@ -109,6 +109,7 @@ static struct { { NFSV4OP_LAYOUTCOMMIT, 1, "LayoutCommit", 12, }, { NFSV4OP_LAYOUTRETURN, 1, "LayoutReturn", 12, }, { NFSV4OP_RECLAIMCOMPL, 1, "ReclaimComplete", 15, }, + { NFSV4OP_WRITE, 1, "WriteDS", 7, }, }; @@ -118,7 +119,7 @@ static struct { static int nfs_bigrequest[NFSV41_NPROCS] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 1 }; /* @@ -174,6 +175,12 @@ nfscl_reqstart(struct nfsrv_descript *nd * Sequence Op. */ opcnt = 1; + else if (procnum == NFSPROC_WRITEDS) + /* + * For the special case of a Write to a DS, + * the opcnt == 3, for Sequence, PutFH, Write. + */ + opcnt = 3; } /* * What should the tag really be? @@ -203,7 +210,8 @@ nfscl_reqstart(struct nfsrv_descript *nd NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_PUTFH); (void) nfsm_fhtom(nd, nfhp, fhlen, 0); - if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh==2){ + if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh + == 2 && procnum != NFSPROC_WRITEDS) { NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSWCCATTR_ATTRBIT(&attrbits);