2 * include/linux/nfsd/nfsfh.h
4 * This file describes the layout of the file handles as passed
7 * Earlier versions of knfsd used to sign file handles using keyed MD5
8 * or SHA. I've removed this code, because it doesn't give you more
9 * security than blocking external access to port 2049 on your firewall.
13 #ifndef _LINUX_NFSD_FH_H
14 #define _LINUX_NFSD_FH_H
16 # include <linux/sunrpc/svc.h>
17 #include <uapi/linux/nfsd/nfsfh.h>
19 static inline __u32 ino_t_to_u32(ino_t ino)
24 static inline ino_t u32_to_ino_t(__u32 uino)
30 * This is the internal representation of an NFS handle used in knfsd.
31 * pre_mtime/post_version will be used to support wcc_attr's in NFSv3.
33 typedef struct svc_fh {
34 struct knfsd_fh fh_handle; /* FH data */
35 struct dentry * fh_dentry; /* validated dentry */
36 struct svc_export * fh_export; /* export pointer */
37 int fh_maxsize; /* max size for fh_handle */
39 unsigned char fh_locked; /* inode locked by us */
40 unsigned char fh_want_write; /* remount protection taken */
43 unsigned char fh_post_saved; /* post-op attrs saved */
44 unsigned char fh_pre_saved; /* pre-op attrs saved */
46 /* Pre-op attributes saved during fh_lock */
47 __u64 fh_pre_size; /* size before operation */
48 struct timespec fh_pre_mtime; /* mtime before oper */
49 struct timespec fh_pre_ctime; /* ctime before oper */
51 * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode)
52 * to find out if it is valid.
56 /* Post-op attributes saved in fh_unlock */
57 struct kstat fh_post_attr; /* full attrs after operation */
58 u64 fh_post_change; /* nfsv4 change; see above */
59 #endif /* CONFIG_NFSD_V3 */
63 #endif /* _LINUX_NFSD_FH_H */