Lines Matching refs:fhp

154 static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)  in nfsd_set_fh_dentry()  argument
156 struct knfsd_fh *fh = &fhp->fh_handle; in nfsd_set_fh_dentry()
203 trace_nfsd_set_fh_dentry_badexport(rqstp, fhp, PTR_ERR(exp)); in nfsd_set_fh_dentry()
253 trace_nfsd_set_fh_dentry_badhandle(rqstp, fhp, in nfsd_set_fh_dentry()
278 fhp->fh_dentry = dentry; in nfsd_set_fh_dentry()
279 fhp->fh_export = exp; in nfsd_set_fh_dentry()
284 fhp->fh_no_atomic_attr = true; in nfsd_set_fh_dentry()
288 fhp->fh_no_wcc = true; in nfsd_set_fh_dentry()
291 fhp->fh_no_wcc = true; in nfsd_set_fh_dentry()
328 fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access) in fh_verify() argument
334 dprintk("nfsd: fh_verify(%s)\n", SVCFH_fmt(fhp)); in fh_verify()
336 if (!fhp->fh_dentry) { in fh_verify()
337 error = nfsd_set_fh_dentry(rqstp, fhp); in fh_verify()
341 dentry = fhp->fh_dentry; in fh_verify()
342 exp = fhp->fh_export; in fh_verify()
415 static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, in _fh_update() argument
420 (fhp->fh_handle.fh_fsid + fhp->fh_handle.fh_size/4 - 1); in _fh_update()
421 int maxsize = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4; in _fh_update()
424 fhp->fh_handle.fh_fileid_type = in _fh_update()
426 fhp->fh_handle.fh_size += maxsize * 4; in _fh_update()
428 fhp->fh_handle.fh_fileid_type = FILEID_ROOT; in _fh_update()
467 static void set_version_and_fsid_type(struct svc_fh *fhp, struct svc_export *exp, struct svc_fh *re… in set_version_and_fsid_type() argument
500 if (fhp->fh_maxsize >= 64) { in set_version_and_fsid_type()
516 fhp->fh_handle.fh_version = version; in set_version_and_fsid_type()
518 fhp->fh_handle.fh_fsid_type = fsid_type; in set_version_and_fsid_type()
522 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, in fh_compose() argument
543 set_version_and_fsid_type(fhp, exp, ref_fh); in fh_compose()
546 fhp->fh_no_wcc = ref_fh ? ref_fh->fh_no_wcc : false; in fh_compose()
548 if (ref_fh == fhp) in fh_compose()
551 if (fhp->fh_locked || fhp->fh_dentry) { in fh_compose()
555 if (fhp->fh_maxsize < NFS_FHSIZE) in fh_compose()
557 fhp->fh_maxsize, in fh_compose()
560 fhp->fh_dentry = dget(dentry); /* our internal copy */ in fh_compose()
561 fhp->fh_export = exp_get(exp); in fh_compose()
563 fhp->fh_handle.fh_size = in fh_compose()
564 key_len(fhp->fh_handle.fh_fsid_type) + 4; in fh_compose()
565 fhp->fh_handle.fh_auth_type = 0; in fh_compose()
567 mk_fsid(fhp->fh_handle.fh_fsid_type, in fh_compose()
568 fhp->fh_handle.fh_fsid, in fh_compose()
574 _fh_update(fhp, exp, dentry); in fh_compose()
575 if (fhp->fh_handle.fh_fileid_type == FILEID_INVALID) { in fh_compose()
576 fh_put(fhp); in fh_compose()
588 fh_update(struct svc_fh *fhp) in fh_update() argument
592 if (!fhp->fh_dentry) in fh_update()
595 dentry = fhp->fh_dentry; in fh_update()
598 if (fhp->fh_handle.fh_fileid_type != FILEID_ROOT) in fh_update()
601 _fh_update(fhp, fhp->fh_export, dentry); in fh_update()
602 if (fhp->fh_handle.fh_fileid_type == FILEID_INVALID) in fh_update()
618 fh_put(struct svc_fh *fhp) in fh_put() argument
620 struct dentry * dentry = fhp->fh_dentry; in fh_put()
621 struct svc_export * exp = fhp->fh_export; in fh_put()
623 fh_unlock(fhp); in fh_put()
624 fhp->fh_dentry = NULL; in fh_put()
626 fh_clear_wcc(fhp); in fh_put()
628 fh_drop_write(fhp); in fh_put()
631 fhp->fh_export = NULL; in fh_put()
633 fhp->fh_no_wcc = false; in fh_put()
640 char * SVCFH_fmt(struct svc_fh *fhp) in SVCFH_fmt() argument
642 struct knfsd_fh *fh = &fhp->fh_handle; in SVCFH_fmt()
651 enum fsid_source fsid_source(const struct svc_fh *fhp) in fsid_source() argument
653 if (fhp->fh_handle.fh_version != 1) in fsid_source()
655 switch(fhp->fh_handle.fh_fsid_type) { in fsid_source()
659 if (exp_sb(fhp->fh_export)->s_type->fs_flags & FS_REQUIRES_DEV) in fsid_source()
663 if (fhp->fh_export->ex_flags & NFSEXP_FSID) in fsid_source()
672 if (fhp->fh_export->ex_flags & NFSEXP_FSID) in fsid_source()
674 if (fhp->fh_export->ex_uuid) in fsid_source()