net: fix build erros with CONFIG_BUG=n, CONFIG_GENERIC_BUG=n
[safe/jmp/linux-2.6] / include / linux / nfs4.h
index ec3cd49..c4c0602 100644 (file)
@@ -21,6 +21,7 @@
 #define NFS4_FHSIZE            128
 #define NFS4_MAXPATHLEN                PATH_MAX
 #define NFS4_MAXNAMLEN         NAME_MAX
+#define NFS4_OPAQUE_LIMIT      1024
 #define NFS4_MAX_SESSIONID_LEN 16
 
 #define NFS4_ACCESS_READ        0x0001
 
 #define NFS4_MAX_UINT64        (~(u64)0)
 
+/* An NFS4 sessions server must support at least NFS4_MAX_OPS operations.
+ * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly.
+ */
+#define NFS4_MAX_OPS   8
+
+/* Our NFS4 client back channel server only wants the cb_sequene and the
+ * actual operation per compound
+ */
+#define NFS4_MAX_BACK_CHANNEL_OPS 2
+
 enum nfs4_acl_whotype {
        NFS4_ACL_WHO_NAMED = 0,
        NFS4_ACL_WHO_OWNER,
@@ -223,7 +234,7 @@ enum nfs_opnum4 {
 Needs to be updated if more operations are defined in future.*/
 
 #define FIRST_NFS4_OP  OP_ACCESS
-#define LAST_NFS4_OP   OP_RELEASE_LOCKOWNER
+#define LAST_NFS4_OP   OP_RECLAIM_COMPLETE
 
 enum nfsstat4 {
        NFS4_OK = 0,
@@ -368,7 +379,13 @@ enum opentype4 {
 enum createmode4 {
        NFS4_CREATE_UNCHECKED = 0,
        NFS4_CREATE_GUARDED = 1,
-       NFS4_CREATE_EXCLUSIVE = 2
+       NFS4_CREATE_EXCLUSIVE = 2,
+       /*
+        * New to NFSv4.1. If session is persistent,
+        * GUARDED4 MUST be used. Otherwise, use
+        * EXCLUSIVE4_1 instead of EXCLUSIVE4.
+        */
+       NFS4_CREATE_EXCLUSIVE4_1 = 3
 };
 
 enum limit_by4 {
@@ -455,7 +472,15 @@ enum lock_type4 {
 
 #define NFSPROC4_NULL 0
 #define NFSPROC4_COMPOUND 1
+#define NFS4_VERSION 4
 #define NFS4_MINOR_VERSION 0
+
+#if defined(CONFIG_NFS_V4_1)
+#define NFS4_MAX_MINOR_VERSION 1
+#else
+#define NFS4_MAX_MINOR_VERSION 0
+#endif /* CONFIG_NFS_V4_1 */
+
 #define NFS4_DEBUG 1
 
 /* Index of predefined Linux client operations */