Lines Matching refs:fhp

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