Lines Matching refs:fhp
50 decode_fh(__be32 *p, struct svc_fh *fhp) in decode_fh() argument
53 fh_init(fhp, NFS3_FHSIZE); in decode_fh()
58 memcpy(&fhp->fh_handle.fh_base, p, size); in decode_fh()
59 fhp->fh_handle.fh_size = size; in decode_fh()
64 __be32 *nfs3svc_decode_fh(__be32 *p, struct svc_fh *fhp) in nfs3svc_decode_fh() argument
66 return decode_fh(p, fhp); in nfs3svc_decode_fh()
70 encode_fh(__be32 *p, struct svc_fh *fhp) in encode_fh() argument
72 unsigned int size = fhp->fh_handle.fh_size; in encode_fh()
75 memcpy(p, &fhp->fh_handle.fh_base, size); in encode_fh()
144 static __be32 *encode_fsid(__be32 *p, struct svc_fh *fhp) in encode_fsid() argument
147 switch(fsid_source(fhp)) { in encode_fsid()
151 (fhp->fh_dentry->d_sb->s_dev)); in encode_fsid()
154 p = xdr_encode_hyper(p, (u64) fhp->fh_export->ex_fsid); in encode_fsid()
157 f = ((u64*)fhp->fh_export->ex_uuid)[0]; in encode_fsid()
158 f ^= ((u64*)fhp->fh_export->ex_uuid)[1]; in encode_fsid()
166 encode_fattr3(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, in encode_fattr3() argument
183 p = encode_fsid(p, fhp); in encode_fattr3()
193 encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) in encode_saved_post_attr() argument
197 return encode_fattr3(rqstp, p, fhp, &fhp->fh_post_attr); in encode_saved_post_attr()
206 encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) in encode_post_op_attr() argument
208 struct dentry *dentry = fhp->fh_dentry; in encode_post_op_attr()
213 err = fh_getattr(fhp, &stat); in encode_post_op_attr()
217 return encode_fattr3(rqstp, p, fhp, &stat); in encode_post_op_attr()
226 nfs3svc_encode_post_op_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) in nfs3svc_encode_post_op_attr() argument
228 return encode_post_op_attr(rqstp, p, fhp); in nfs3svc_encode_post_op_attr()
235 encode_wcc_data(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) in encode_wcc_data() argument
237 struct dentry *dentry = fhp->fh_dentry; in encode_wcc_data()
239 if (dentry && d_really_is_positive(dentry) && fhp->fh_post_saved) { in encode_wcc_data()
240 if (fhp->fh_pre_saved) { in encode_wcc_data()
242 p = xdr_encode_hyper(p, (u64) fhp->fh_pre_size); in encode_wcc_data()
243 p = encode_time3(p, &fhp->fh_pre_mtime); in encode_wcc_data()
244 p = encode_time3(p, &fhp->fh_pre_ctime); in encode_wcc_data()
248 return encode_saved_post_attr(rqstp, p, fhp); in encode_wcc_data()
252 return encode_post_op_attr(rqstp, p, fhp); in encode_wcc_data()
258 void fill_pre_wcc(struct svc_fh *fhp) in fill_pre_wcc() argument
264 if (fhp->fh_pre_saved) in fill_pre_wcc()
267 inode = d_inode(fhp->fh_dentry); in fill_pre_wcc()
268 err = fh_getattr(fhp, &stat); in fill_pre_wcc()
276 fhp->fh_pre_mtime = stat.mtime; in fill_pre_wcc()
277 fhp->fh_pre_ctime = stat.ctime; in fill_pre_wcc()
278 fhp->fh_pre_size = stat.size; in fill_pre_wcc()
279 fhp->fh_pre_change = nfsd4_change_attribute(&stat, inode); in fill_pre_wcc()
280 fhp->fh_pre_saved = true; in fill_pre_wcc()
286 void fill_post_wcc(struct svc_fh *fhp) in fill_post_wcc() argument
290 if (fhp->fh_post_saved) in fill_post_wcc()
293 err = fh_getattr(fhp, &fhp->fh_post_attr); in fill_post_wcc()
294 fhp->fh_post_change = nfsd4_change_attribute(&fhp->fh_post_attr, in fill_post_wcc()
295 d_inode(fhp->fh_dentry)); in fill_post_wcc()
297 fhp->fh_post_saved = false; in fill_post_wcc()
299 fhp->fh_post_attr.ctime = d_inode(fhp->fh_dentry)->i_ctime; in fill_post_wcc()
301 fhp->fh_post_saved = true; in fill_post_wcc()
853 compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp, in compose_entry_fh() argument
884 rv = fh_compose(fhp, exp, dchild, &cd->fh); in compose_entry_fh()