]> err.no Git - linux-2.6/blobdiff - include/linux/nfs_fs.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6
[linux-2.6] / include / linux / nfs_fs.h
index fb33e7655cfaf973c1b0f06ca630ae1cf406b5fb..8ea249110fb0b5029c88b35717f2ce3e5387f507 100644 (file)
@@ -84,7 +84,8 @@ struct nfs_open_context {
        int error;
 
        struct list_head list;
-       wait_queue_head_t waitq;
+
+       __u64 dir_cookie;
 };
 
 /*
@@ -92,6 +93,8 @@ struct nfs_open_context {
  */
 struct nfs_delegation;
 
+struct posix_acl;
+
 /*
  * nfs fs inode data in memory
  */
@@ -128,7 +131,6 @@ struct nfs_inode {
         *
         *      mtime != read_cache_mtime
         */
-       unsigned long           readdir_timestamp;
        unsigned long           read_cache_jiffies;
        unsigned long           attrtimeo;
        unsigned long           attrtimeo_timestamp;
@@ -146,6 +148,10 @@ struct nfs_inode {
        atomic_t                data_updates;
 
        struct nfs_access_entry cache_access;
+#ifdef CONFIG_NFS_V3_ACL
+       struct posix_acl        *acl_access;
+       struct posix_acl        *acl_default;
+#endif
 
        /*
         * This is the cookie verifier used for NFSv3 readdir
@@ -171,13 +177,13 @@ struct nfs_inode {
        wait_queue_head_t       nfs_i_wait;
 
 #ifdef CONFIG_NFS_V4
+       struct nfs4_cached_acl  *nfs4_acl;
         /* NFSv4 state */
        struct list_head        open_states;
        struct nfs_delegation   *delegation;
        int                      delegation_state;
        struct rw_semaphore     rwsem;
 #endif /* CONFIG_NFS_V4*/
-
        struct inode            vfs_inode;
 };
 
@@ -191,6 +197,8 @@ struct nfs_inode {
 #define NFS_INO_INVALID_DATA   0x0010          /* cached data is invalid */
 #define NFS_INO_INVALID_ATIME  0x0020          /* cached atime is invalid */
 #define NFS_INO_INVALID_ACCESS 0x0040          /* cached access cred invalid */
+#define NFS_INO_INVALID_ACL    0x0080          /* cached acls are invalid */
+#define NFS_INO_REVAL_PAGECACHE        0x1000          /* must revalidate pagecache */
 
 static inline struct nfs_inode *NFS_I(struct inode *inode)
 {
@@ -282,12 +290,12 @@ extern int nfs_release(struct inode *, struct file *);
 extern int nfs_attribute_timeout(struct inode *inode);
 extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
 extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
+extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
 extern int nfs_setattr(struct dentry *, struct iattr *);
 extern void nfs_begin_attr_update(struct inode *);
 extern void nfs_end_attr_update(struct inode *);
 extern void nfs_begin_data_update(struct inode *);
 extern void nfs_end_data_update(struct inode *);
-extern void nfs_end_data_update_defer(struct inode *);
 extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred);
 extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
 extern void put_nfs_open_context(struct nfs_open_context *ctx);
@@ -302,6 +310,9 @@ extern u32 root_nfs_parse_addr(char *name); /*__init*/
  * linux/fs/nfs/file.c
  */
 extern struct inode_operations nfs_file_inode_operations;
+#ifdef CONFIG_NFS_V3
+extern struct inode_operations nfs3_file_inode_operations;
+#endif /* CONFIG_NFS_V3 */
 extern struct file_operations nfs_file_operations;
 extern struct address_space_operations nfs_file_aops;
 
@@ -316,6 +327,22 @@ static inline struct rpc_cred *nfs_file_cred(struct file *file)
        return NULL;
 }
 
+/*
+ * linux/fs/nfs/xattr.c
+ */
+#ifdef CONFIG_NFS_V3_ACL
+extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t);
+extern ssize_t nfs3_getxattr(struct dentry *, const char *, void *, size_t);
+extern int nfs3_setxattr(struct dentry *, const char *,
+                       const void *, size_t, int);
+extern int nfs3_removexattr (struct dentry *, const char *name);
+#else
+# define nfs3_listxattr NULL
+# define nfs3_getxattr NULL
+# define nfs3_setxattr NULL
+# define nfs3_removexattr NULL
+#endif
+
 /*
  * linux/fs/nfs/direct.c
  */
@@ -330,6 +357,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf,
  * linux/fs/nfs/dir.c
  */
 extern struct inode_operations nfs_dir_inode_operations;
+#ifdef CONFIG_NFS_V3
+extern struct inode_operations nfs3_dir_inode_operations;
+#endif /* CONFIG_NFS_V3 */
 extern struct file_operations nfs_dir_operations;
 extern struct dentry_operations nfs_dentry_operations;
 
@@ -365,10 +395,10 @@ extern void nfs_commit_done(struct rpc_task *);
  */
 extern int  nfs_sync_inode(struct inode *, unsigned long, unsigned int, int);
 #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
-extern int  nfs_commit_inode(struct inode *, unsigned long, unsigned int, int);
+extern int  nfs_commit_inode(struct inode *, int);
 #else
 static inline int
-nfs_commit_inode(struct inode *inode, unsigned long idx_start, unsigned int npages, int how)
+nfs_commit_inode(struct inode *inode, int how)
 {
        return 0;
 }
@@ -450,6 +480,29 @@ static inline void nfs_readdata_free(struct nfs_read_data *p)
 
 extern void  nfs_readdata_release(struct rpc_task *task);
 
+/*
+ * linux/fs/nfs3proc.c
+ */
+#ifdef CONFIG_NFS_V3_ACL
+extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type);
+extern int nfs3_proc_setacl(struct inode *inode, int type,
+                           struct posix_acl *acl);
+extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode,
+               mode_t mode);
+extern void nfs3_forget_cached_acls(struct inode *inode);
+#else
+static inline int nfs3_proc_set_default_acl(struct inode *dir,
+                                           struct inode *inode,
+                                           mode_t mode)
+{
+       return 0;
+}
+
+static inline void nfs3_forget_cached_acls(struct inode *inode)
+{
+}
+#endif /* CONFIG_NFS_V3_ACL */
+
 /*
  * linux/fs/mount_clnt.c
  * (Used only by nfsroot module)