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.
This commit is contained in:
parent
b35131985b
commit
1ffac5aafb
@ -487,8 +487,8 @@ int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int,
|
||||
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 *);
|
||||
|
@ -5078,13 +5078,12 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
|
||||
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, int fhlen, int reclaim,
|
||||
*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,
|
||||
|
@ -5235,7 +5235,7 @@ nfscl_layoutreturn(struct nfsmount *nmp, struct nfscllayout *lyp,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user