0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _LINUX_NFS_H
0009 #define _LINUX_NFS_H
0010
0011 #include <linux/sunrpc/msg_prot.h>
0012 #include <linux/string.h>
0013 #include <uapi/linux/nfs.h>
0014
0015
0016
0017
0018 #define NFS_MAXFHSIZE 128
0019 struct nfs_fh {
0020 unsigned short size;
0021 unsigned char data[NFS_MAXFHSIZE];
0022 };
0023
0024
0025
0026
0027
0028 static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
0029 {
0030 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
0031 }
0032
0033 static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
0034 {
0035 target->size = source->size;
0036 memcpy(target->data, source->data, source->size);
0037 }
0038
0039 enum nfs3_stable_how {
0040 NFS_UNSTABLE = 0,
0041 NFS_DATA_SYNC = 1,
0042 NFS_FILE_SYNC = 2,
0043
0044
0045 NFS_INVALID_STABLE_HOW = -1
0046 };
0047 #endif