Add a function nfsm_set() to initialize "struct nfsrv_descript" for building
mbuf lists. This function is currently trivial, but will that will change when support for building NFS messages in ext_pgs mbufs is added. Adding support for ext_pgs mbufs is needed for KERN_TLS, which will be used to implement nfs-over-tls.
This commit is contained in:
@@ -4778,3 +4778,14 @@ nfsv4_findmirror(struct nfsmount *nmp)
|
||||
return (ds);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fill in the fields of "struct nfsrv_descript".
|
||||
*/
|
||||
void
|
||||
nfsm_set(struct nfsrv_descript *nd, u_int offs)
|
||||
{
|
||||
struct mbuf *m;
|
||||
|
||||
m = nd->nd_mb;
|
||||
nd->nd_bpos = mtod(m, char *) + offs;
|
||||
}
|
||||
|
||||
@@ -360,6 +360,7 @@ int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *,
|
||||
void nfsv4_freeslot(struct nfsclsession *, int);
|
||||
struct ucred *nfsrv_getgrpscred(struct ucred *);
|
||||
struct nfsdevice *nfsv4_findmirror(struct nfsmount *);
|
||||
void nfsm_set(struct nfsrv_descript *, u_int);
|
||||
|
||||
/* nfs_clcomsubs.c */
|
||||
void nfsm_uiombuf(struct nfsrv_descript *, struct uio *, int);
|
||||
|
||||
@@ -5080,7 +5080,7 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fhp, off_t off, int len,
|
||||
while (m->m_next != NULL)
|
||||
m = m->m_next;
|
||||
nd->nd_mb = m;
|
||||
nd->nd_bpos = mtod(m, char *) + m->m_len;
|
||||
nfsm_set(nd, m->m_len);
|
||||
NFSD_DEBUG(4, "nfsrv_writedsdorpc: lastmb len=%d\n", m->m_len);
|
||||
|
||||
/* Do a Getattr for the attributes that change upon writing. */
|
||||
|
||||
Reference in New Issue
Block a user