2 * NFS protocol definitions
4 * This file contains constants mostly for Version 2 of the protocol,
5 * but also has a couple of NFSv3 bits in (notably the error codes).
10 #include <linux/sunrpc/msg_prot.h>
11 #include <linux/string.h>
12 #include <uapi/linux/nfs.h>
15 * This is the kernel NFS client file handle representation
17 #define NFS_MAXFHSIZE 128
20 unsigned char data
[NFS_MAXFHSIZE
];
24 * Returns a zero iff the size and data fields match.
25 * Checks only "size" bytes in the data field.
27 static inline int nfs_compare_fh(const struct nfs_fh
*a
, const struct nfs_fh
*b
)
29 return a
->size
!= b
->size
|| memcmp(a
->data
, b
->data
, a
->size
) != 0;
32 static inline void nfs_copy_fh(struct nfs_fh
*target
, const struct nfs_fh
*source
)
34 target
->size
= source
->size
;
35 memcpy(target
->data
, source
->data
, source
->size
);
40 * This is really a general kernel constant, but since nothing like
41 * this is defined in the kernel headers, I have to do it here.
43 #define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1))
46 enum nfs3_stable_how
{
51 #endif /* _LINUX_NFS_H */