From owner-svn-src-all@freebsd.org Tue Sep 19 20:45:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 116D6E03A86; Tue, 19 Sep 2017 20:45:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFB9C6C1CD; Tue, 19 Sep 2017 20:45:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8JKjQKm044376; Tue, 19 Sep 2017 20:45:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8JKjPOc044372; Tue, 19 Sep 2017 20:45:25 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201709192045.v8JKjPOc044372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 19 Sep 2017 20:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323779 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 323779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 20:45:27 -0000 Author: rmacklem Date: Tue Sep 19 20:45:25 2017 New Revision: 323779 URL: https://svnweb.freebsd.org/changeset/base/323779 Log: Simplify nfsrpc_layoutreturn() args. Simplify nfsrpc_layoutreturn() args. in preparation for the addition of Flex File layout support, since File layout uses a 0 length field. Flex Files does use a longer field, but that will be added in a subsequent commit. Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfs/nfs_var.h Tue Sep 19 20:45:25 2017 (r323779) @@ -487,8 +487,8 @@ int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, struct ucred *, NFSPROC_T *, void *); int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t, - int, uint64_t, uint64_t, nfsv4stateid_t *, int, uint32_t *, struct ucred *, - NFSPROC_T *, void *); + int, uint64_t, uint64_t, nfsv4stateid_t *, struct ucred *, NFSPROC_T *, + void *); int nfsrpc_reclaimcomplete(struct nfsmount *, struct ucred *, NFSPROC_T *); int nfscl_doiods(vnode_t, struct uio *, int *, int *, uint32_t, int, struct ucred *, NFSPROC_T *); Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Tue Sep 19 20:45:25 2017 (r323779) @@ -5078,13 +5078,12 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim, int layouttype, uint32_t iomode, int layoutreturn, uint64_t offset, - uint64_t len, nfsv4stateid_t *stateidp, int layoutcnt, uint32_t *layp, - struct ucred *cred, NFSPROC_T *p, void *stuff) + uint64_t len, nfsv4stateid_t *stateidp, struct ucred *cred, NFSPROC_T *p, + void *stuff) { uint32_t *tl; struct nfsrv_descript nfsd, *nd = &nfsd; - int error, outcnt, i; - uint8_t *cp; + int error; nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); @@ -5107,15 +5106,7 @@ nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, *tl++ = stateidp->other[0]; *tl++ = stateidp->other[1]; *tl++ = stateidp->other[2]; - *tl = txdr_unsigned(layoutcnt); - if (layoutcnt > 0) { - outcnt = NFSM_RNDUP(layoutcnt); - NFSM_BUILD(cp, uint8_t *, outcnt); - NFSBCOPY(layp, cp, layoutcnt); - cp += layoutcnt; - for (i = 0; i < (outcnt - layoutcnt); i++) - *cp++ = 0x0; - } + *tl = txdr_unsigned(0); } nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:40:05 2017 (r323778) +++ head/sys/fs/nfsclient/nfs_clstate.c Tue Sep 19 20:45:25 2017 (r323779) @@ -5235,7 +5235,7 @@ nfscl_layoutreturn(struct nfsmount *nmp, struct nfscll lyp->nfsly_fhlen, 0, NFSLAYOUT_NFSV4_1_FILES, rp->nfsrecly_iomode, rp->nfsrecly_recalltype, rp->nfsrecly_off, rp->nfsrecly_len, - &stateid, 0, NULL, cred, p, NULL); + &stateid, cred, p, NULL); } }