Lines Matching defs:nfhp
2053 struct nfs_filehandle *nfhp,
2069 error = nfsrv_fhtovp(nfhp, nd, &dp, nxp, nxop);
3155 nfsrv_fhtoexport(struct nfs_filehandle *nfhp)
3157 struct nfs_exphandle *nxh = (struct nfs_exphandle*)nfhp->nfh_fhp;
3181 struct nfs_filehandle *nfhp,
3187 struct nfs_exphandle *nxh = (struct nfs_exphandle*)nfhp->nfh_fhp;
3208 if (nfhp->nfh_len > NFSV3_MAX_FH_SIZE)
3210 if (nfhp->nfh_len < (int)sizeof(struct nfs_exphandle))
3216 *nxp = nfsrv_fhtoexport(nfhp);
3272 fidp = nfhp->nfh_fhp + sizeof(*nxh);
3321 struct nfs_filehandle *nfhp)
3326 nfhp->nfh_fhp = (u_char*)&nfhp->nfh_xh;
3327 nfhp->nfh_xh.nxh_version = htonl(NFS_FH_VERSION);
3328 nfhp->nfh_xh.nxh_fsid = htonl(nx->nx_fs->nxfs_id);
3329 nfhp->nfh_xh.nxh_expid = htonl(nx->nx_id);
3330 nfhp->nfh_xh.nxh_flags = 0;
3331 nfhp->nfh_xh.nxh_reserved = 0;
3334 bzero(&nfhp->nfh_fid[0], NFSV2_MAX_FID_SIZE);
3339 nfhp->nfh_len = NFSX_V2FH;
3341 nfhp->nfh_len = sizeof(nfhp->nfh_xh);
3342 nfhp->nfh_xh.nxh_fidlen = 0;
3343 nfhp->nfh_xh.nxh_flags = htons(NXHF_INVALIDFH);
3351 nfhp->nfh_len = maxfidsize;
3353 error = VFS_VPTOFH(vp, (int*)&nfhp->nfh_len, &nfhp->nfh_fid[0], ctx);
3356 if (nfhp->nfh_len > maxfidsize)
3358 nfhp->nfh_xh.nxh_fidlen = nfhp->nfh_len;
3359 nfhp->nfh_len += sizeof(nfhp->nfh_xh);
3360 if ((nfsvers == NFS_VER2) && (nfhp->nfh_len < NFSX_V2FH))
3361 nfhp->nfh_len = NFSX_V2FH;