staging: gasket: fix check_and_invoke_callback log param
[linux-2.6/btrfs-unstable.git] / include / linux / nfs.h
blob0dc7ad38a0da4f4df118806c8f9cf01876b1bcd5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * NFS protocol definitions
5 * This file contains constants mostly for Version 2 of the protocol,
6 * but also has a couple of NFSv3 bits in (notably the error codes).
7 */
8 #ifndef _LINUX_NFS_H
9 #define _LINUX_NFS_H
11 #include <linux/sunrpc/msg_prot.h>
12 #include <linux/string.h>
13 #include <uapi/linux/nfs.h>
16 * This is the kernel NFS client file handle representation
18 #define NFS_MAXFHSIZE 128
19 struct nfs_fh {
20 unsigned short size;
21 unsigned char data[NFS_MAXFHSIZE];
25 * Returns a zero iff the size and data fields match.
26 * Checks only "size" bytes in the data field.
28 static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
30 return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
33 static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
35 target->size = source->size;
36 memcpy(target->data, source->data, source->size);
41 * This is really a general kernel constant, but since nothing like
42 * this is defined in the kernel headers, I have to do it here.
44 #define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1))
47 enum nfs3_stable_how {
48 NFS_UNSTABLE = 0,
49 NFS_DATA_SYNC = 1,
50 NFS_FILE_SYNC = 2,
52 /* used by direct.c to mark verf as invalid */
53 NFS_INVALID_STABLE_HOW = -1
55 #endif /* _LINUX_NFS_H */