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); } } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"