Lines Matching refs:fhp
81 svcxdr_decode_nfs_fh3(struct xdr_stream *xdr, struct svc_fh *fhp) in svcxdr_decode_nfs_fh3() argument
93 fh_init(fhp, NFS3_FHSIZE); in svcxdr_decode_nfs_fh3()
94 fhp->fh_handle.fh_size = size; in svcxdr_decode_nfs_fh3()
95 memcpy(&fhp->fh_handle.fh_raw, p, size); in svcxdr_decode_nfs_fh3()
123 svcxdr_encode_nfs_fh3(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_nfs_fh3() argument
125 u32 size = fhp->fh_handle.fh_size; in svcxdr_encode_nfs_fh3()
134 memcpy(p, &fhp->fh_handle.fh_raw, size); in svcxdr_encode_nfs_fh3()
140 svcxdr_encode_post_op_fh3(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_post_op_fh3() argument
144 if (!svcxdr_encode_nfs_fh3(xdr, fhp)) in svcxdr_encode_post_op_fh3()
202 svcxdr_decode_diropargs3(struct xdr_stream *xdr, struct svc_fh *fhp, in svcxdr_decode_diropargs3() argument
205 return svcxdr_decode_nfs_fh3(xdr, fhp) && in svcxdr_decode_diropargs3()
339 const struct svc_fh *fhp, const struct kstat *stat) in svcxdr_encode_fattr3() argument
366 switch(fsid_source(fhp)) { in svcxdr_encode_fattr3()
368 fsid = (u64)fhp->fh_export->ex_fsid; in svcxdr_encode_fattr3()
371 fsid = ((u64 *)fhp->fh_export->ex_uuid)[0]; in svcxdr_encode_fattr3()
372 fsid ^= ((u64 *)fhp->fh_export->ex_uuid)[1]; in svcxdr_encode_fattr3()
375 fsid = (u64)huge_encode_dev(fhp->fh_dentry->d_sb->s_dev); in svcxdr_encode_fattr3()
390 svcxdr_encode_wcc_attr(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_wcc_attr() argument
397 p = xdr_encode_hyper(p, (u64)fhp->fh_pre_size); in svcxdr_encode_wcc_attr()
398 p = encode_nfstime3(p, &fhp->fh_pre_mtime); in svcxdr_encode_wcc_attr()
399 encode_nfstime3(p, &fhp->fh_pre_ctime); in svcxdr_encode_wcc_attr()
405 svcxdr_encode_pre_op_attr(struct xdr_stream *xdr, const struct svc_fh *fhp) in svcxdr_encode_pre_op_attr() argument
407 if (!fhp->fh_pre_saved) { in svcxdr_encode_pre_op_attr()
415 return svcxdr_encode_wcc_attr(xdr, fhp); in svcxdr_encode_pre_op_attr()
430 const struct svc_fh *fhp) in svcxdr_encode_post_op_attr() argument
432 struct dentry *dentry = fhp->fh_dentry; in svcxdr_encode_post_op_attr()
440 if (fhp->fh_no_wcc || !dentry || !d_really_is_positive(dentry)) in svcxdr_encode_post_op_attr()
442 if (fh_getattr(fhp, &stat) != nfs_ok) in svcxdr_encode_post_op_attr()
448 if (!svcxdr_encode_fattr3(rqstp, xdr, fhp, &stat)) in svcxdr_encode_post_op_attr()
462 const struct svc_fh *fhp) in svcxdr_encode_wcc_data() argument
464 struct dentry *dentry = fhp->fh_dentry; in svcxdr_encode_wcc_data()
466 if (!dentry || !d_really_is_positive(dentry) || !fhp->fh_post_saved) in svcxdr_encode_wcc_data()
470 if (!svcxdr_encode_pre_op_attr(xdr, fhp)) in svcxdr_encode_wcc_data()
476 if (!svcxdr_encode_fattr3(rqstp, xdr, fhp, &fhp->fh_post_attr)) in svcxdr_encode_wcc_data()
484 if (!svcxdr_encode_post_op_attr(rqstp, xdr, fhp)) in svcxdr_encode_wcc_data()
498 void fill_pre_wcc(struct svc_fh *fhp) in fill_pre_wcc() argument
502 bool v4 = (fhp->fh_maxsize == NFS4_FHSIZE); in fill_pre_wcc()
504 if (fhp->fh_no_wcc || fhp->fh_pre_saved) in fill_pre_wcc()
506 inode = d_inode(fhp->fh_dentry); in fill_pre_wcc()
508 __be32 err = fh_getattr(fhp, &stat); in fill_pre_wcc()
516 fhp->fh_pre_mtime = stat.mtime; in fill_pre_wcc()
517 fhp->fh_pre_ctime = stat.ctime; in fill_pre_wcc()
518 fhp->fh_pre_size = stat.size; in fill_pre_wcc()
521 fhp->fh_pre_change = nfsd4_change_attribute(&stat, inode); in fill_pre_wcc()
523 fhp->fh_pre_saved = true; in fill_pre_wcc()
529 void fill_post_wcc(struct svc_fh *fhp) in fill_post_wcc() argument
531 bool v4 = (fhp->fh_maxsize == NFS4_FHSIZE); in fill_post_wcc()
532 struct inode *inode = d_inode(fhp->fh_dentry); in fill_post_wcc()
534 if (fhp->fh_no_wcc) in fill_post_wcc()
537 if (fhp->fh_post_saved) in fill_post_wcc()
540 fhp->fh_post_saved = true; in fill_post_wcc()
543 __be32 err = fh_getattr(fhp, &fhp->fh_post_attr); in fill_post_wcc()
546 fhp->fh_post_saved = false; in fill_post_wcc()
547 fhp->fh_post_attr.ctime = inode->i_ctime; in fill_post_wcc()
551 fhp->fh_post_change = in fill_post_wcc()
552 nfsd4_change_attribute(&fhp->fh_post_attr, inode); in fill_post_wcc()
1055 compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, in compose_entry_fh() argument
1086 rv = fh_compose(fhp, exp, dchild, &cd->fh); in compose_entry_fh()
1183 struct svc_fh *fhp = &resp->scratch; in svcxdr_encode_entry3_plus() local
1187 fh_init(fhp, NFS3_FHSIZE); in svcxdr_encode_entry3_plus()
1188 if (compose_entry_fh(resp, fhp, name, namlen, ino) != nfs_ok) in svcxdr_encode_entry3_plus()
1191 if (!svcxdr_encode_post_op_attr(resp->rqstp, xdr, fhp)) in svcxdr_encode_entry3_plus()
1193 if (!svcxdr_encode_post_op_fh3(xdr, fhp)) in svcxdr_encode_entry3_plus()
1198 fh_put(fhp); in svcxdr_encode_entry3_plus()