nfscl: Add a cred argument to nfscl_reqstart()

To deal with broken session slots caused by the use of the
"soft" and/or "intr" mount options, nfsv4_sequencelookup()
will be modified to track the potentially broken session
slots.  Then, when all session slots are potentially
broken, do a DeleteSession operation, so that the NFSv4
server will reply NFSERR_BADSESSION to uses of the session.
These changes will be done in future commits.  However,
to do the DeleteSession RPC, a "cred" argument is needed
for nfscl_reqstart().  This patch adds this argument,
which is unused at this time.  If the argument is NULL,
it indicates that DeleteSession should not be done
(usually because the RPC does not use sessions).

This patch should not cause any semantics change.

PR: 260011
MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2022-07-08 16:58:06 -07:00
parent 16e4487e5f
commit 326bcf9394
5 changed files with 108 additions and 95 deletions

View File

@ -323,7 +323,7 @@ static int nfs_bigrequest[NFSV42_NPROCS] = {
void
nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
u_int8_t *nfhp, int fhlen, u_int32_t **opcntpp, struct nfsclsession *sep,
int vers, int minorvers)
int vers, int minorvers, __unused struct ucred *cred)
{
struct mbuf *mb;
u_int32_t *tl;

View File

@ -317,7 +317,8 @@ void nfsrc_trimcache(uint64_t, uint32_t, int);
/* nfs_commonsubs.c */
void nfscl_reqstart(struct nfsrv_descript *, int, struct nfsmount *,
u_int8_t *, int, u_int32_t **, struct nfsclsession *, int, int);
u_int8_t *, int, u_int32_t **, struct nfsclsession *, int, int,
struct ucred *);
void nfsm_stateidtom(struct nfsrv_descript *, nfsv4stateid_t *, int);
void nfscl_fillsattr(struct nfsrv_descript *, struct vattr *,
vnode_t, int, u_int32_t);

View File

@ -49,10 +49,10 @@ struct nfsv4node {
/*
* Just a macro to convert the nfscl_reqstart arguments.
*/
#define NFSCL_REQSTART(n, p, v) \
#define NFSCL_REQSTART(n, p, v, c) \
nfscl_reqstart((n), (p), VFSTONFS((v)->v_mount), \
VTONFS(v)->n_fhp->nfh_fh, VTONFS(v)->n_fhp->nfh_len, NULL, \
NULL, 0, 0)
NULL, 0, 0, (c))
/*
* These two macros convert between a lease duration and renew interval.

View File

@ -241,7 +241,7 @@ nfsrpc_null(vnode_t vp, struct ucred *cred, NFSPROC_T *p)
int error;
struct nfsrv_descript nfsd, *nd = &nfsd;
NFSCL_REQSTART(nd, NFSPROC_NULL, vp);
NFSCL_REQSTART(nd, NFSPROC_NULL, vp, NULL);
error = nfscl_request(nd, vp, p, cred);
if (nd->nd_repstat && !error)
error = nd->nd_repstat;
@ -308,7 +308,7 @@ nfsrpc_accessrpc(vnode_t vp, u_int32_t mode, struct ucred *cred,
*attrflagp = 0;
supported = mode;
NFSCL_REQSTART(nd, NFSPROC_ACCESS, vp);
NFSCL_REQSTART(nd, NFSPROC_ACCESS, vp, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(mode);
if (nd->nd_flag & ND_NFSV4) {
@ -508,7 +508,8 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen,
dp = *dpp;
*dpp = NULL;
nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0);
nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0,
cred);
NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid);
*tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH);
@ -701,7 +702,7 @@ nfsrpc_opendowngrade(vnode_t vp, u_int32_t mode, struct nfsclopen *op,
struct nfsrv_descript nfsd, *nd = &nfsd;
int error;
NFSCL_REQSTART(nd, NFSPROC_OPENDOWNGRADE, vp);
NFSCL_REQSTART(nd, NFSPROC_OPENDOWNGRADE, vp, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 3 * NFSX_UNSIGNED);
if (NFSHASNFSV4N(VFSTONFS(vp->v_mount)))
*tl++ = 0;
@ -866,7 +867,7 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsmount *nmp,
int error;
nfscl_reqstart(nd, NFSPROC_CLOSE, nmp, op->nfso_fh,
op->nfso_fhlen, NULL, NULL, 0, 0);
op->nfso_fhlen, NULL, NULL, 0, 0, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID);
if (NFSHASNFSV4N(nmp)) {
*tl++ = 0;
@ -912,7 +913,7 @@ nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhlen,
if (NFSHASNFSV4N(nmp))
return (0); /* No confirmation for NFSv4.1. */
nfscl_reqstart(nd, NFSPROC_OPENCONFIRM, nmp, nfhp, fhlen, NULL, NULL,
0, 0);
0, 0, NULL);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID);
*tl++ = op->nfso_stateid.seqid;
*tl++ = op->nfso_stateid.other[0];
@ -1105,7 +1106,8 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
tsep = NFSMNT_MDSSESSION(nmp);
NFSUNLOCKMNT(nmp);
nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0);
nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0,
NULL);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(nfsboottime.tv_sec);
*tl = txdr_unsigned(clp->nfsc_rev);
@ -1175,7 +1177,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim,
* and confirm it.
*/
nfscl_reqstart(nd, NFSPROC_SETCLIENTIDCFRM, nmp, NULL, 0, NULL,
NULL, 0, 0);
NULL, 0, 0, NULL);
NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED);
*tl++ = tsep->nfsess_clientid.lval[0];
*tl++ = tsep->nfsess_clientid.lval[1];
@ -1206,7 +1208,7 @@ nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
int error;
nfsattrbit_t attrbits;
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp, cred);
if (nd->nd_flag & ND_NFSV4) {
NFSGETATTR_ATTRBIT(&attrbits);
(void) nfsrv_putattrbit(nd, &attrbits);
@ -1234,7 +1236,8 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
int error, vers = NFS_VER2;
nfsattrbit_t attrbits;
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0);
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0,
cred);
if (nd->nd_flag & ND_NFSV4) {
vers = NFS_VER4;
NFSGETATTR_ATTRBIT(&attrbits);
@ -1358,7 +1361,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vattr *vap,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_SETATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_SETATTR, vp, cred);
if (nd->nd_flag & ND_NFSV4)
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
vap->va_type = vp->v_type;
@ -1431,12 +1434,12 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
name[0] == '.' && name[1] == '.') {
lookupp = 1;
openmode = 0;
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, dvp);
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, dvp, cred);
} else if (openmode != 0) {
NFSCL_REQSTART(nd, NFSPROC_LOOKUPOPEN, dvp);
NFSCL_REQSTART(nd, NFSPROC_LOOKUPOPEN, dvp, cred);
nfsm_strtom(nd, name, len);
} else {
NFSCL_REQSTART(nd, NFSPROC_LOOKUP, dvp);
NFSCL_REQSTART(nd, NFSPROC_LOOKUP, dvp, cred);
(void) nfsm_strtom(nd, name, len);
}
if (nd->nd_flag & ND_NFSV4) {
@ -1641,7 +1644,7 @@ nfsrpc_readlink(vnode_t vp, struct uio *uiop, struct ucred *cred,
int error, len, cangetattr = 1;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_READLINK, vp);
NFSCL_REQSTART(nd, NFSPROC_READLINK, vp, cred);
if (nd->nd_flag & ND_NFSV4) {
/*
* And do a Getattr op.
@ -1777,7 +1780,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *uiop, struct ucred *cred,
while (tsiz > 0) {
*attrflagp = 0;
len = (tsiz > rsize) ? rsize : tsiz;
NFSCL_REQSTART(nd, NFSPROC_READ, vp);
NFSCL_REQSTART(nd, NFSPROC_READ, vp, cred);
if (nd->nd_flag & ND_NFSV4)
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED * 3);
@ -1961,9 +1964,9 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode,
*attrflagp = 0;
len = (tsiz > wsize) ? wsize : tsiz;
if (do_append)
NFSCL_REQSTART(nd, NFSPROC_APPENDWRITE, vp);
NFSCL_REQSTART(nd, NFSPROC_APPENDWRITE, vp, cred);
else
NFSCL_REQSTART(nd, NFSPROC_WRITE, vp);
NFSCL_REQSTART(nd, NFSPROC_WRITE, vp, cred);
if (nd->nd_flag & ND_NFSV4) {
if (do_append) {
NFSZERO_ATTRBIT(&attrbits);
@ -2225,7 +2228,7 @@ nfsrpc_deallocaterpc(vnode_t vp, off_t offs, off_t len,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_DEALLOCATE, vp);
NFSCL_REQSTART(nd, NFSPROC_DEALLOCATE, vp, cred);
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER);
txdr_hyper(offs, tl);
@ -2278,7 +2281,7 @@ nfsrpc_mknod(vnode_t dvp, char *name, int namelen, struct vattr *vap,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_MKNOD, dvp);
NFSCL_REQSTART(nd, NFSPROC_MKNOD, dvp, cred);
if (nd->nd_flag & ND_NFSV4) {
if (vtyp == VBLK || vtyp == VCHR) {
NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
@ -2427,7 +2430,7 @@ nfsrpc_createv23(vnode_t dvp, char *name, int namelen, struct vattr *vap,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_CREATE, dvp);
NFSCL_REQSTART(nd, NFSPROC_CREATE, dvp, cred);
(void) nfsm_strtom(nd, name, namelen);
if (nd->nd_flag & ND_NFSV3) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
@ -2489,7 +2492,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_CREATE, dvp);
NFSCL_REQSTART(nd, NFSPROC_CREATE, dvp, cred);
/*
* For V4, this is actually an Open op.
*/
@ -2729,7 +2732,7 @@ nfsrpc_remove(vnode_t dvp, char *name, int namelen, vnode_t vp,
if (NFSHASNFSV4(nmp) && ret == 0) {
ret = nfscl_removedeleg(vp, p, &dstateid);
if (ret == 1) {
NFSCL_REQSTART(nd, NFSPROC_RETDELEGREMOVE, vp);
NFSCL_REQSTART(nd, NFSPROC_RETDELEGREMOVE, vp, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID +
NFSX_UNSIGNED);
if (NFSHASNFSV4N(nmp))
@ -2750,7 +2753,7 @@ nfsrpc_remove(vnode_t dvp, char *name, int namelen, vnode_t vp,
ret = 0;
}
if (ret == 0)
NFSCL_REQSTART(nd, NFSPROC_REMOVE, dvp);
NFSCL_REQSTART(nd, NFSPROC_REMOVE, dvp, cred);
(void) nfsm_strtom(nd, name, namelen);
error = nfscl_request(nd, dvp, p, cred);
if (error)
@ -2810,11 +2813,11 @@ nfsrpc_rename(vnode_t fdvp, vnode_t fvp, char *fnameptr, int fnamelen,
ret = nfscl_renamedeleg(fvp, &fdstateid, &gotfd, tvp,
&tdstateid, &gottd, p);
if (gotfd && gottd) {
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME2, fvp);
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME2, fvp, cred);
} else if (gotfd) {
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME1, fvp);
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME1, fvp, cred);
} else if (gottd) {
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME1, tvp);
NFSCL_REQSTART(nd, NFSPROC_RETDELEGRENAME1, tvp, cred);
}
if (gotfd) {
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
@ -2858,7 +2861,7 @@ nfsrpc_rename(vnode_t fdvp, vnode_t fvp, char *fnameptr, int fnamelen,
ret = 0;
}
if (ret == 0)
NFSCL_REQSTART(nd, NFSPROC_RENAME, fdvp);
NFSCL_REQSTART(nd, NFSPROC_RENAME, fdvp, cred);
if (nd->nd_flag & ND_NFSV4) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
@ -2957,7 +2960,7 @@ nfsrpc_link(vnode_t dvp, vnode_t vp, char *name, int namelen,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_LINK, vp);
NFSCL_REQSTART(nd, NFSPROC_LINK, vp, cred);
if (nd->nd_flag & ND_NFSV4) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_PUTFH);
@ -3024,7 +3027,7 @@ nfsrpc_symlink(vnode_t dvp, char *name, int namelen, const char *target,
slen = strlen(target);
if (slen > NFS_MAXPATHLEN || namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_SYMLINK, dvp);
NFSCL_REQSTART(nd, NFSPROC_SYMLINK, dvp, cred);
if (nd->nd_flag & ND_NFSV4) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFLNK);
@ -3087,7 +3090,7 @@ nfsrpc_mkdir(vnode_t dvp, char *name, int namelen, struct vattr *vap,
fhp = VTONFS(dvp)->n_fhp;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_MKDIR, dvp);
NFSCL_REQSTART(nd, NFSPROC_MKDIR, dvp, cred);
if (nd->nd_flag & ND_NFSV4) {
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFDIR);
@ -3159,7 +3162,7 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_RMDIR, dvp);
NFSCL_REQSTART(nd, NFSPROC_RMDIR, dvp, cred);
(void) nfsm_strtom(nd, name, namelen);
error = nfscl_request(nd, dvp, p, cred);
if (error)
@ -3276,7 +3279,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
* Joy, oh joy. For V4 we get to hand craft '.' and '..'.
*/
if (uiop->uio_offset == 0) {
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp);
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp, cred);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OP_GETFH);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
@ -3393,7 +3396,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
*/
while (more_dirs && bigenough) {
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_READDIR, vp);
NFSCL_REQSTART(nd, NFSPROC_READDIR, vp, cred);
if (nd->nd_flag & ND_NFSV2) {
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = cookie.lval[1];
@ -3717,7 +3720,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
* Joy, oh joy. For V4 we get to hand craft '.' and '..'.
*/
if (uiop->uio_offset == 0) {
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp);
NFSCL_REQSTART(nd, NFSPROC_LOOKUPP, vp, cred);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OP_GETFH);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
@ -3839,7 +3842,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
*/
while (more_dirs && bigenough) {
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_READDIRPLUS, vp);
NFSCL_REQSTART(nd, NFSPROC_READDIRPLUS, vp, cred);
NFSM_BUILD(tl, u_int32_t *, 6 * NFSX_UNSIGNED);
*tl++ = cookie.lval[0];
*tl++ = cookie.lval[1];
@ -4193,7 +4196,7 @@ nfsrpc_commit(vnode_t vp, u_quad_t offset, int cnt, struct ucred *cred,
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_COMMIT, vp);
NFSCL_REQSTART(nd, NFSPROC_COMMIT, vp, cred);
NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
txdr_hyper(offset, tl);
tl += 2;
@ -4413,7 +4416,7 @@ nfsrpc_lockt(struct nfsrv_descript *nd, vnode_t vp,
struct nfsclsession *tsep;
nmp = VFSTONFS(vp->v_mount);
NFSCL_REQSTART(nd, NFSPROC_LOCKT, vp);
NFSCL_REQSTART(nd, NFSPROC_LOCKT, vp, cred);
NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED);
if (fl->l_type == F_RDLCK)
*tl++ = txdr_unsigned(NFSV4LOCKT_READ);
@ -4484,7 +4487,7 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmount *nmp,
int error;
nfscl_reqstart(nd, NFSPROC_LOCKU, nmp, lp->nfsl_open->nfso_fh,
lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0);
lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 6 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(type);
*tl = txdr_unsigned(lp->nfsl_seqid);
@ -4536,7 +4539,8 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount *nmp, vnode_t vp,
uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX];
struct nfsclsession *tsep;
nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0);
nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0,
cred);
NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED);
if (type == F_RDLCK)
*tl++ = txdr_unsigned(NFSV4LOCKT_READ);
@ -4630,7 +4634,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp,
/*
* For V4, you actually do a getattr.
*/
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp, cred);
NFSSTATFS_GETATTRBIT(&attrbits);
(void) nfsrv_putattrbit(nd, &attrbits);
nd->nd_flag |= ND_USEGSSNAME;
@ -4653,7 +4657,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp,
if (error)
goto nfsmout;
} else {
NFSCL_REQSTART(nd, NFSPROC_FSSTAT, vp);
NFSCL_REQSTART(nd, NFSPROC_FSSTAT, vp, NULL);
error = nfscl_request(nd, vp, p, cred);
if (error)
return (error);
@ -4708,7 +4712,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc,
/*
* For V4, you actually do a getattr.
*/
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp, cred);
NFSPATHCONF_GETATTRBIT(&attrbits);
(void) nfsrv_putattrbit(nd, &attrbits);
nd->nd_flag |= ND_USEGSSNAME;
@ -4725,7 +4729,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc,
error = nd->nd_repstat;
}
} else {
NFSCL_REQSTART(nd, NFSPROC_PATHCONF, vp);
NFSCL_REQSTART(nd, NFSPROC_PATHCONF, vp, NULL);
error = nfscl_request(nd, vp, p, cred);
if (error)
return (error);
@ -4761,7 +4765,7 @@ nfsrpc_fsinfo(vnode_t vp, struct nfsfsinfo *fsp, struct ucred *cred,
int error;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_FSINFO, vp);
NFSCL_REQSTART(nd, NFSPROC_FSINFO, vp, cred);
error = nfscl_request(nd, vp, p, cred);
if (error)
return (error);
@ -4808,10 +4812,10 @@ nfsrpc_renew(struct nfsclclient *clp, struct nfsclds *dsp, struct ucred *cred,
return (0);
if (dsp == NULL)
nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL, NULL, 0,
0);
0, cred);
else
nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL,
&dsp->nfsclds_sess, 0, 0);
&dsp->nfsclds_sess, 0, 0, NULL);
if (!NFSHASNFSV4N(nmp)) {
/* NFSv4.1 just uses a Sequence Op and not a Renew. */
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
@ -4858,11 +4862,11 @@ nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllockowner *lp,
if (NFSHASNFSV4N(nmp)) {
/* For NFSv4.1, do a FreeStateID. */
nfscl_reqstart(nd, NFSPROC_FREESTATEID, nmp, NULL, 0, NULL,
NULL, 0, 0);
NULL, 0, 0, cred);
nfsm_stateidtom(nd, &lp->nfsl_stateid, NFSSTATEID_PUTSTATEID);
} else {
nfscl_reqstart(nd, NFSPROC_RELEASELCKOWN, nmp, NULL, 0, NULL,
NULL, 0, 0);
NULL, 0, 0, NULL);
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
tsep = nfsmnt_mdssession(nmp);
*tl++ = tsep->nfsess_clientid.lval[0];
@ -4896,7 +4900,7 @@ nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpath, struct ucred *cred,
u_int32_t *opcntp;
nfscl_reqstart(nd, NFSPROC_PUTROOTFH, nmp, NULL, 0, &opcntp, NULL, 0,
0);
0, NULL);
cp = dirpath;
cnt = 0;
do {
@ -4963,7 +4967,7 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred *cred,
int error;
nfscl_reqstart(nd, NFSPROC_DELEGRETURN, nmp, dp->nfsdl_fh,
dp->nfsdl_fhlen, NULL, NULL, 0, 0);
dp->nfsdl_fhlen, NULL, NULL, 0, 0, cred);
NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID);
if (NFSHASNFSV4N(nmp))
*tl++ = 0;
@ -4996,7 +5000,7 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, struct acl *aclp)
if (nfsrv_useacl == 0 || !NFSHASNFSV4(nmp))
return (EOPNOTSUPP);
NFSCL_REQSTART(nd, NFSPROC_GETACL, vp);
NFSCL_REQSTART(nd, NFSPROC_GETACL, vp, cred);
NFSZERO_ATTRBIT(&attrbits);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL);
(void) nfsrv_putattrbit(nd, &attrbits);
@ -5041,7 +5045,7 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
if (!NFSHASNFSV4(nmp))
return (EOPNOTSUPP);
NFSCL_REQSTART(nd, NFSPROC_SETACL, vp);
NFSCL_REQSTART(nd, NFSPROC_SETACL, vp, cred);
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
NFSZERO_ATTRBIT(&attrbits);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL);
@ -5074,7 +5078,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclclient *clp,
if (minorvers == 0)
minorvers = nmp->nm_minorvers;
nfscl_reqstart(nd, NFSPROC_EXCHANGEID, nmp, NULL, 0, NULL, NULL,
NFS_VER4, minorvers);
NFS_VER4, minorvers, NULL);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(nfsboottime.tv_sec); /* Client owner */
*tl = txdr_unsigned(clp->nfsc_rev);
@ -5170,7 +5174,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsclsession *sep,
else
minorvers = NFSV41_MINORVERSION;
nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL,
NFS_VER4, minorvers);
NFS_VER4, minorvers, NULL);
NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED);
*tl++ = sep->nfsess_clientid.lval[0];
*tl++ = sep->nfsess_clientid.lval[1];
@ -5301,7 +5305,7 @@ nfsrpc_destroysession(struct nfsmount *nmp, struct nfsclclient *clp,
struct nfsclsession *tsep;
nfscl_reqstart(nd, NFSPROC_DESTROYSESSION, nmp, NULL, 0, NULL, NULL, 0,
0);
0, NULL);
NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID);
tsep = nfsmnt_mdssession(nmp);
bcopy(tsep->nfsess_sessionid, tl, NFSX_V4SESSIONID);
@ -5329,7 +5333,7 @@ nfsrpc_destroyclient(struct nfsmount *nmp, struct nfsclclient *clp,
struct nfsclsession *tsep;
nfscl_reqstart(nd, NFSPROC_DESTROYCLIENT, nmp, NULL, 0, NULL, NULL, 0,
0);
0, NULL);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED);
tsep = nfsmnt_mdssession(nmp);
*tl++ = tsep->nfsess_clientid.lval[0];
@ -5357,7 +5361,7 @@ nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, int fhlen, int iomode,
int error;
nfscl_reqstart(nd, NFSPROC_LAYOUTGET, nmp, fhp, fhlen, NULL, NULL, 0,
0);
0, cred);
nfsrv_setuplayoutget(nd, iomode, offset, len, minlen, stateidp,
layouttype, layoutlen, 0);
nd->nd_flag |= ND_USEGSSNAME;
@ -5401,7 +5405,7 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *deviceid, int layouttype,
ndi = NULL;
gotdspp = NULL;
nfscl_reqstart(nd, NFSPROC_GETDEVICEINFO, nmp, NULL, 0, NULL, NULL, 0,
0);
0, cred);
NFSM_BUILD(tl, uint32_t *, NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED);
NFSBCOPY(deviceid, tl, NFSX_V4DEVICEID);
tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED);
@ -5622,7 +5626,7 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
int error;
nfscl_reqstart(nd, NFSPROC_LAYOUTCOMMIT, nmp, fh, fhlen, NULL, NULL,
0, 0);
0, 0, cred);
NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED + 3 * NFSX_HYPER +
NFSX_STATEID);
txdr_hyper(off, tl);
@ -5673,7 +5677,7 @@ nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
int error;
nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL,
0, 0);
0, 0, cred);
NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED);
if (reclaim != 0)
*tl++ = newnfs_true;
@ -5759,7 +5763,7 @@ nfsrpc_layouterror(struct nfsmount *nmp, uint8_t *fh, int fhlen, uint64_t offset
int error;
nfscl_reqstart(nd, NFSPROC_LAYOUTERROR, nmp, fh, fhlen, NULL, NULL,
0, 0);
0, 0, cred);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_STATEID +
NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED);
txdr_hyper(offset, tl); tl += 2;
@ -6068,7 +6072,7 @@ nfsrpc_reclaimcomplete(struct nfsmount *nmp, struct ucred *cred, NFSPROC_T *p)
int error;
nfscl_reqstart(nd, NFSPROC_RECLAIMCOMPL, nmp, NULL, 0, NULL, NULL, 0,
0);
0, cred);
NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
*tl = newnfs_false;
nd->nd_flag |= ND_USEGSSNAME;
@ -6691,7 +6695,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4stateid_t *stateidp, int *eofp,
nd->nd_mrep = NULL;
if (vers == 0 || vers == NFS_VER4) {
nfscl_reqstart(nd, NFSPROC_READDS, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
vers = NFS_VER4;
NFSCL_DEBUG(4, "nfsrpc_readds: vers4 minvers=%d\n", minorvers);
if (flex != 0)
@ -6700,7 +6705,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4stateid_t *stateidp, int *eofp,
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSEQIDZERO);
} else {
nfscl_reqstart(nd, NFSPROC_READ, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_READ]);
NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_READDS]);
NFSCL_DEBUG(4, "nfsrpc_readds: vers3\n");
@ -6767,7 +6773,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
nd->nd_mrep = NULL;
if (vers == 0 || vers == NFS_VER4) {
nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
NFSCL_DEBUG(4, "nfsrpc_writeds: vers4 minvers=%d\n", minorvers);
vers = NFS_VER4;
if (flex != 0)
@ -6777,7 +6784,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit,
NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED);
} else {
nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITE]);
NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITEDS]);
NFSCL_DEBUG(4, "nfsrpc_writeds: vers3\n");
@ -6900,7 +6908,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_commit,
nd->nd_mrep = NULL;
if (vers == 0 || vers == NFS_VER4) {
nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
vers = NFS_VER4;
NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers4 minvers=%d\n",
minorvers);
@ -6908,7 +6917,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_commit,
NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED);
} else {
nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITE]);
NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITEDS]);
NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers3\n");
@ -7128,11 +7138,13 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp,
nd->nd_mrep = NULL;
if (vers == 0 || vers == NFS_VER4) {
nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
vers = NFS_VER4;
} else {
nfscl_reqstart(nd, NFSPROC_COMMIT, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers,
NULL);
NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_COMMIT]);
NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_COMMITDS]);
}
@ -7247,7 +7259,7 @@ nfsrpc_advise(vnode_t vp, off_t offset, uint64_t cnt, int advise,
NFSSETBIT_ATTRBIT(&hints, NFSV4IOHINT_DONTNEED);
else
return (0);
NFSCL_REQSTART(nd, NFSPROC_IOADVISE, vp);
NFSCL_REQSTART(nd, NFSPROC_IOADVISE, vp, cred);
nfsm_stateidtom(nd, NULL, NFSSTATEID_PUTALLZERO);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER);
txdr_hyper(offset, tl);
@ -7291,7 +7303,7 @@ nfsrpc_adviseds(vnode_t vp, uint64_t offset, int cnt, int advise,
return (0);
nd->nd_mrep = NULL;
nfscl_reqstart(nd, NFSPROC_IOADVISEDS, nmp, fhp->nfh_fh,
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers);
fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, NULL);
vers = NFS_VER4;
NFSCL_DEBUG(4, "nfsrpc_adviseds: vers=%d minvers=%d\n", vers,
minorvers);
@ -7460,7 +7472,7 @@ nfsrpc_allocaterpc(vnode_t vp, off_t off, off_t len, nfsv4stateid_t *stateidp,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_ALLOCATE, vp);
NFSCL_REQSTART(nd, NFSPROC_ALLOCATE, vp, cred);
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, uint32_t *, 2 * NFSX_HYPER + NFSX_UNSIGNED);
txdr_hyper(off, tl); tl += 2;
@ -7948,7 +7960,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp,
*dpp = NULL;
*laystatp = ENXIO;
nfscl_reqstart(nd, NFSPROC_OPENLAYGET, nmp, nfhp, fhlen, NULL, NULL,
0, 0);
0, 0, cred);
NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid);
*tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH);
@ -8133,7 +8145,7 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap,
*dattrflagp = 0;
if (namelen > NFS_MAXNAMLEN)
return (ENAMETOOLONG);
NFSCL_REQSTART(nd, NFSPROC_CREATELAYGET, dvp);
NFSCL_REQSTART(nd, NFSPROC_CREATELAYGET, dvp, cred);
/*
* For V4, this is actually an Open op.
*/
@ -8574,7 +8586,7 @@ nfsrpc_copyrpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff,
*lenp = 0;
if (len > nfs_maxcopyrange)
len = nfs_maxcopyrange;
NFSCL_REQSTART(nd, NFSPROC_COPY, invp);
NFSCL_REQSTART(nd, NFSPROC_COPY, invp, cred);
NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
NFSGETATTR_ATTRBIT(&attrbits);
@ -8739,7 +8751,7 @@ nfsrpc_seekrpc(vnode_t vp, off_t *offp, nfsv4stateid_t *stateidp, bool *eofp,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_SEEK, vp);
NFSCL_REQSTART(nd, NFSPROC_SEEK, vp, cred);
nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED);
txdr_hyper(*offp, tl); tl += 2;
@ -8783,7 +8795,7 @@ nfsrpc_getextattr(vnode_t vp, const char *name, struct uio *uiop, ssize_t *lenp,
uint32_t len, len2;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_GETEXTATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_GETEXTATTR, vp, cred);
nfsm_strtom(nd, name, strlen(name));
NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
@ -8853,7 +8865,7 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct uio *uiop,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_SETEXTATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_SETEXTATTR, vp, cred);
if (uiop->uio_resid > nd->nd_maxreq) {
/* nd_maxreq is set by NFSCL_REQSTART(). */
m_freem(nd->nd_mreq);
@ -8901,7 +8913,7 @@ nfsrpc_rmextattr(vnode_t vp, const char *name, struct nfsvattr *nap,
nfsattrbit_t attrbits;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_RMEXTATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_RMEXTATTR, vp, cred);
nfsm_strtom(nd, name, strlen(name));
NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED);
*tl = txdr_unsigned(NFSV4OP_GETATTR);
@ -8941,7 +8953,7 @@ nfsrpc_listextattr(vnode_t vp, uint64_t *cookiep, struct uio *uiop,
u_char c;
*attrflagp = 0;
NFSCL_REQSTART(nd, NFSPROC_LISTEXTATTR, vp);
NFSCL_REQSTART(nd, NFSPROC_LISTEXTATTR, vp, cred);
NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED);
txdr_hyper(*cookiep, tl); tl += 2;
*tl++ = txdr_unsigned(*lenp);
@ -9115,7 +9127,7 @@ nfsrpc_bindconnsess(CLIENT *cl, void *arg, struct ucred *cr)
int error;
nfscl_reqstart(nd, NFSPROC_BINDCONNTOSESS, NULL, NULL, 0, NULL, NULL,
NFS_VER4, rcp->minorvers);
NFS_VER4, rcp->minorvers, NULL);
NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID + 2 * NFSX_UNSIGNED);
memcpy(tl, rcp->sessionid, NFSX_V4SESSIONID);
tl += NFSX_V4SESSIONID / NFSX_UNSIGNED;

View File

@ -5234,7 +5234,7 @@ nfsrv_readdsrpc(fhandle_t *fhp, off_t off, int len, struct ucred *cred,
st.other[2] = 0x55555555;
st.seqid = 0xffffffff;
nfscl_reqstart(nd, NFSPROC_READDS, nmp, (u_int8_t *)fhp, sizeof(*fhp),
NULL, NULL, 0, 0);
NULL, NULL, 0, 0, NULL);
nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3);
txdr_hyper(off, tl);
@ -5342,7 +5342,7 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off, int len,
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
nfscl_reqstart(nd, NFSPROC_WRITE, nmp, (u_int8_t *)fhp,
sizeof(fhandle_t), NULL, NULL, 0, 0);
sizeof(fhandle_t), NULL, NULL, 0, 0, NULL);
/*
* Use a stateid where other is an alternating 01010 pattern and
@ -5564,7 +5564,7 @@ nfsrv_allocatedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off,
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
nfscl_reqstart(nd, NFSPROC_ALLOCATE, nmp, (u_int8_t *)fhp,
sizeof(fhandle_t), NULL, NULL, 0, 0);
sizeof(fhandle_t), NULL, NULL, 0, 0, NULL);
/*
* Use a stateid where other is an alternating 01010 pattern and
@ -5724,7 +5724,7 @@ nfsrv_deallocatedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off,
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
nfscl_reqstart(nd, NFSPROC_DEALLOCATE, nmp, (u_int8_t *)fhp,
sizeof(fhandle_t), NULL, NULL, 0, 0);
sizeof(fhandle_t), NULL, NULL, 0, 0, NULL);
/*
* Use a stateid where other is an alternating 01010 pattern and
@ -5899,7 +5899,7 @@ nfsrv_setattrdsdorpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
st.other[2] = 0x55555555;
st.seqid = 0xffffffff;
nfscl_reqstart(nd, NFSPROC_SETATTR, nmp, (u_int8_t *)fhp, sizeof(*fhp),
NULL, NULL, 0, 0);
NULL, NULL, 0, 0, NULL);
nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID);
nfscl_fillsattr(nd, &nap->na_vattr, vp, NFSSATTR_FULL, 0);
@ -6084,7 +6084,7 @@ nfsrv_setacldsdorpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
st.other[2] = 0x55555555;
st.seqid = 0xffffffff;
nfscl_reqstart(nd, NFSPROC_SETACL, nmp, (u_int8_t *)fhp, sizeof(*fhp),
NULL, NULL, 0, 0);
NULL, NULL, 0, 0, NULL);
nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID);
NFSZERO_ATTRBIT(&attrbits);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL);
@ -6219,7 +6219,7 @@ nfsrv_getattrdsrpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
NFSD_DEBUG(4, "in nfsrv_getattrdsrpc\n");
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, (u_int8_t *)fhp,
sizeof(fhandle_t), NULL, NULL, 0, 0);
sizeof(fhandle_t), NULL, NULL, 0, 0, NULL);
NFSZERO_ATTRBIT(&attrbits);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_SIZE);
NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_CHANGE);
@ -6287,7 +6287,7 @@ nfsrv_seekdsrpc(fhandle_t *fhp, off_t *offp, int content, bool *eofp,
st.seqid = 0xffffffff;
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
nfscl_reqstart(nd, NFSPROC_SEEKDS, nmp, (u_int8_t *)fhp,
sizeof(fhandle_t), NULL, NULL, 0, 0);
sizeof(fhandle_t), NULL, NULL, 0, 0, NULL);
nfsm_stateidtom(nd, &st, NFSSTATEID_PUTSTATEID);
NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED);
txdr_hyper(*offp, tl); tl += 2;