[PATCH] kill d_alloc_anon
[safe/jmp/linux-2.6] / include / linux / nfs4.h
index 1477fc8..ea03667 100644 (file)
 #define _LINUX_NFS4_H
 
 #include <linux/types.h>
-#include <linux/list.h>
 
+#define NFS4_BITMAP_SIZE       2
 #define NFS4_VERIFIER_SIZE     8
+#define NFS4_STATEID_SIZE      16
 #define NFS4_FHSIZE            128
 #define NFS4_MAXPATHLEN                PATH_MAX
 #define NFS4_MAXNAMLEN         NAME_MAX
@@ -64,9 +65,6 @@
 #define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG   0x00000010
 #define NFS4_ACE_FAILED_ACCESS_ACE_FLAG       0x00000020
 #define NFS4_ACE_IDENTIFIER_GROUP             0x00000040
-#define NFS4_ACE_OWNER                        0x00000080
-#define NFS4_ACE_GROUP                        0x00000100
-#define NFS4_ACE_EVERYONE                     0x00000200
 
 #define NFS4_ACE_READ_DATA                    0x00000001
 #define NFS4_ACE_LIST_DIRECTORY               0x00000001
@@ -97,22 +95,24 @@ enum nfs4_acl_whotype {
        NFS4_ACL_WHO_EVERYONE,
 };
 
+#ifdef __KERNEL__
+#include <linux/list.h>
+
 struct nfs4_ace {
        uint32_t        type;
        uint32_t        flag;
        uint32_t        access_mask;
        int             whotype;
        uid_t           who;
-       struct list_head l_ace;
 };
 
 struct nfs4_acl {
        uint32_t        naces;
-       struct list_head ace_head;
+       struct nfs4_ace aces[0];
 };
 
 typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
-typedef struct { char data[16]; } nfs4_stateid;
+typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid;
 
 enum nfs_opnum4 {
        OP_ACCESS = 3,
@@ -155,6 +155,12 @@ enum nfs_opnum4 {
        OP_ILLEGAL = 10044,
 };
 
+/*Defining first and last NFS4 operations implemented.
+Needs to be updated if more operations are defined in future.*/
+
+#define FIRST_NFS4_OP  OP_ACCESS
+#define LAST_NFS4_OP   OP_RELEASE_LOCKOWNER
+
 enum nfsstat4 {
        NFS4_OK = 0,
        NFS4ERR_PERM = 1,
@@ -345,8 +351,6 @@ enum lock_type4 {
 #define NFS4_MINOR_VERSION 0
 #define NFS4_DEBUG 1
 
-#ifdef __KERNEL__
-
 /* Index of predefined Linux client operations */
 
 enum {