NFSv4.1: filelayout driver specific code for COMMIT
[deliverable/linux.git] / include / linux / nfs_fs.h
index 0779bb8f95beb9ce6a6ca3ba4b103496a3ddacf4..807e07c86b26241982cde22c8e2c349ea1002abe 100644 (file)
@@ -33,6 +33,8 @@
 #define FLUSH_STABLE           4       /* commit to stable storage */
 #define FLUSH_LOWPRI           8       /* low priority background flush */
 #define FLUSH_HIGHPRI          16      /* high priority memory reclaim flush */
+#define FLUSH_COND_STABLE      32      /* conditional stable write - only stable
+                                        * if everything fits in one RPC */
 
 #ifdef __KERNEL__
 
@@ -93,8 +95,13 @@ struct nfs_open_context {
        int error;
 
        struct list_head list;
+};
 
+struct nfs_open_dir_context {
+       struct rpc_cred *cred;
        __u64 dir_cookie;
+       __u64 dup_cookie;
+       int duped;
 };
 
 /*
@@ -191,6 +198,7 @@ struct nfs_inode {
 
        /* pNFS layout information */
        struct pnfs_layout_hdr *layout;
+       atomic_t                commits_outstanding;
 #endif /* CONFIG_NFS_V4*/
 #ifdef CONFIG_NFS_FSCACHE
        struct fscache_cookie   *fscache;
@@ -215,11 +223,11 @@ struct nfs_inode {
 #define NFS_INO_ADVISE_RDPLUS  (0)             /* advise readdirplus */
 #define NFS_INO_STALE          (1)             /* possible stale inode */
 #define NFS_INO_ACL_LRU_SET    (2)             /* Inode is on the LRU list */
-#define NFS_INO_MOUNTPOINT     (3)             /* inode is remote mountpoint */
 #define NFS_INO_FLUSHING       (4)             /* inode is flushing out data */
 #define NFS_INO_FSCACHE                (5)             /* inode can be cached by FS-Cache */
 #define NFS_INO_FSCACHE_LOCK   (6)             /* FS-Cache cookie management lock */
 #define NFS_INO_COMMIT         (7)             /* inode is committing unstable writes */
+#define NFS_INO_PNFS_COMMIT    (8)             /* use pnfs code for commit */
 
 static inline struct nfs_inode *NFS_I(const struct inode *inode)
 {
@@ -502,7 +510,7 @@ extern int  nfs_writepage(struct page *page, struct writeback_control *wbc);
 extern int  nfs_writepages(struct address_space *, struct writeback_control *);
 extern int  nfs_flush_incompatible(struct file *file, struct page *page);
 extern int  nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
-extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
+extern void nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
 
 /*
  * Try to write back everything synchronously (but check the
This page took 0.097935 seconds and 5 git commands to generate.