This source file includes following definitions.
- nfs_compare_fh
- nfs_copy_fh
1
2
3
4
5
6
7
8 #ifndef _LINUX_NFS_H
9 #define _LINUX_NFS_H
10
11 #include <linux/sunrpc/msg_prot.h>
12 #include <linux/string.h>
13 #include <uapi/linux/nfs.h>
14
15
16
17
18 #define NFS_MAXFHSIZE 128
19 struct nfs_fh {
20 unsigned short size;
21 unsigned char data[NFS_MAXFHSIZE];
22 };
23
24
25
26
27
28 static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
29 {
30 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
31 }
32
33 static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
34 {
35 target->size = source->size;
36 memcpy(target->data, source->data, source->size);
37 }
38
39
40
41
42
43
44 #define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1))
45
46
47 enum nfs3_stable_how {
48 NFS_UNSTABLE = 0,
49 NFS_DATA_SYNC = 1,
50 NFS_FILE_SYNC = 2,
51
52
53 NFS_INVALID_STABLE_HOW = -1
54 };
55 #endif