diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-24 17:03:14 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-24 17:03:14 -0400 |
| commit | 0acd2201920d0968919f4f5797d63f7b6f2b19d4 (patch) | |
| tree | 9b241d264f42eff3ff4eeffb67616fca0490e460 /include/linux | |
| parent | 8f70e95f9f4159184f557a1db60c909d7c1bd2e3 (diff) | |
| parent | 35124a0994fc02545b14b9fa3aad000b3331f1c0 (diff) | |
Merge branch 'nfs-for-2.6.39' into nfs-for-next
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 10 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 7 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 30 |
4 files changed, 45 insertions, 3 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 7e7f6b7e46b1..b528f6d4b860 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -561,6 +561,7 @@ enum { | |||
| 561 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 561 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
| 562 | NFSPROC4_CLNT_LAYOUTGET, | 562 | NFSPROC4_CLNT_LAYOUTGET, |
| 563 | NFSPROC4_CLNT_GETDEVICEINFO, | 563 | NFSPROC4_CLNT_GETDEVICEINFO, |
| 564 | NFSPROC4_CLNT_LAYOUTCOMMIT, | ||
| 564 | }; | 565 | }; |
| 565 | 566 | ||
| 566 | /* nfs41 types */ | 567 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f88522b10a38..1b93b9c60e55 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
| 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
| 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
| 36 | #define FLUSH_COND_STABLE 32 /* conditional stable write - only stable | ||
| 37 | * if everything fits in one RPC */ | ||
| 36 | 38 | ||
| 37 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
| 38 | 40 | ||
| @@ -93,8 +95,13 @@ struct nfs_open_context { | |||
| 93 | int error; | 95 | int error; |
| 94 | 96 | ||
| 95 | struct list_head list; | 97 | struct list_head list; |
| 98 | }; | ||
| 96 | 99 | ||
| 100 | struct nfs_open_dir_context { | ||
| 101 | struct rpc_cred *cred; | ||
| 97 | __u64 dir_cookie; | 102 | __u64 dir_cookie; |
| 103 | __u64 dup_cookie; | ||
| 104 | int duped; | ||
| 98 | }; | 105 | }; |
| 99 | 106 | ||
| 100 | /* | 107 | /* |
| @@ -191,6 +198,7 @@ struct nfs_inode { | |||
| 191 | 198 | ||
| 192 | /* pNFS layout information */ | 199 | /* pNFS layout information */ |
| 193 | struct pnfs_layout_hdr *layout; | 200 | struct pnfs_layout_hdr *layout; |
| 201 | atomic_t commits_outstanding; | ||
| 194 | #endif /* CONFIG_NFS_V4*/ | 202 | #endif /* CONFIG_NFS_V4*/ |
| 195 | #ifdef CONFIG_NFS_FSCACHE | 203 | #ifdef CONFIG_NFS_FSCACHE |
| 196 | struct fscache_cookie *fscache; | 204 | struct fscache_cookie *fscache; |
| @@ -219,6 +227,8 @@ struct nfs_inode { | |||
| 219 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 227 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 220 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 221 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ |
| 230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ | ||
| 231 | #define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */ | ||
| 222 | 232 | ||
| 223 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 233 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 224 | { | 234 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 90907ada6d52..8023e4e25133 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -33,11 +33,15 @@ enum { | |||
| 33 | PG_CLEAN, | 33 | PG_CLEAN, |
| 34 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
| 35 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
| 36 | PG_PNFS_COMMIT, | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | struct nfs_inode; | 39 | struct nfs_inode; |
| 39 | struct nfs_page { | 40 | struct nfs_page { |
| 40 | struct list_head wb_list; /* Defines state of page: */ | 41 | union { |
| 42 | struct list_head wb_list; /* Defines state of page: */ | ||
| 43 | struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */ | ||
| 44 | }; | ||
| 41 | struct page *wb_page; /* page to read in/write out */ | 45 | struct page *wb_page; /* page to read in/write out */ |
| 42 | struct nfs_open_context *wb_context; /* File state context info */ | 46 | struct nfs_open_context *wb_context; /* File state context info */ |
| 43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 47 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
| @@ -57,6 +61,7 @@ struct nfs_pageio_descriptor { | |||
| 57 | size_t pg_count; | 61 | size_t pg_count; |
| 58 | size_t pg_bsize; | 62 | size_t pg_bsize; |
| 59 | unsigned int pg_base; | 63 | unsigned int pg_base; |
| 64 | char pg_moreio; | ||
| 60 | 65 | ||
| 61 | struct inode *pg_inode; | 66 | struct inode *pg_inode; |
| 62 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 67 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index fa1ba78ca2c8..78b101e487ea 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -195,8 +195,9 @@ struct nfs4_get_lease_time_res { | |||
| 195 | #define PNFS_LAYOUT_MAXSIZE 4096 | 195 | #define PNFS_LAYOUT_MAXSIZE 4096 |
| 196 | 196 | ||
| 197 | struct nfs4_layoutdriver_data { | 197 | struct nfs4_layoutdriver_data { |
| 198 | struct page **pages; | ||
| 199 | __u32 pglen; | ||
| 198 | __u32 len; | 200 | __u32 len; |
| 199 | void *buf; | ||
| 200 | }; | 201 | }; |
| 201 | 202 | ||
| 202 | struct pnfs_layout_range { | 203 | struct pnfs_layout_range { |
| @@ -214,6 +215,7 @@ struct nfs4_layoutget_args { | |||
| 214 | struct nfs_open_context *ctx; | 215 | struct nfs_open_context *ctx; |
| 215 | struct nfs4_sequence_args seq_args; | 216 | struct nfs4_sequence_args seq_args; |
| 216 | nfs4_stateid stateid; | 217 | nfs4_stateid stateid; |
| 218 | struct nfs4_layoutdriver_data layout; | ||
| 217 | }; | 219 | }; |
| 218 | 220 | ||
| 219 | struct nfs4_layoutget_res { | 221 | struct nfs4_layoutget_res { |
| @@ -221,8 +223,8 @@ struct nfs4_layoutget_res { | |||
| 221 | struct pnfs_layout_range range; | 223 | struct pnfs_layout_range range; |
| 222 | __u32 type; | 224 | __u32 type; |
| 223 | nfs4_stateid stateid; | 225 | nfs4_stateid stateid; |
| 224 | struct nfs4_layoutdriver_data layout; | ||
| 225 | struct nfs4_sequence_res seq_res; | 226 | struct nfs4_sequence_res seq_res; |
| 227 | struct nfs4_layoutdriver_data *layoutp; | ||
| 226 | }; | 228 | }; |
| 227 | 229 | ||
| 228 | struct nfs4_layoutget { | 230 | struct nfs4_layoutget { |
| @@ -241,6 +243,29 @@ struct nfs4_getdeviceinfo_res { | |||
| 241 | struct nfs4_sequence_res seq_res; | 243 | struct nfs4_sequence_res seq_res; |
| 242 | }; | 244 | }; |
| 243 | 245 | ||
| 246 | struct nfs4_layoutcommit_args { | ||
| 247 | nfs4_stateid stateid; | ||
| 248 | __u64 lastbytewritten; | ||
| 249 | struct inode *inode; | ||
| 250 | const u32 *bitmask; | ||
| 251 | struct nfs4_sequence_args seq_args; | ||
| 252 | }; | ||
| 253 | |||
| 254 | struct nfs4_layoutcommit_res { | ||
| 255 | struct nfs_fattr *fattr; | ||
| 256 | const struct nfs_server *server; | ||
| 257 | struct nfs4_sequence_res seq_res; | ||
| 258 | }; | ||
| 259 | |||
| 260 | struct nfs4_layoutcommit_data { | ||
| 261 | struct rpc_task task; | ||
| 262 | struct nfs_fattr fattr; | ||
| 263 | struct pnfs_layout_segment *lseg; | ||
| 264 | struct rpc_cred *cred; | ||
| 265 | struct nfs4_layoutcommit_args args; | ||
| 266 | struct nfs4_layoutcommit_res res; | ||
| 267 | }; | ||
| 268 | |||
| 244 | /* | 269 | /* |
| 245 | * Arguments to the open call. | 270 | * Arguments to the open call. |
| 246 | */ | 271 | */ |
| @@ -1077,6 +1102,7 @@ struct nfs_write_data { | |||
| 1077 | struct nfs_writeres res; /* result struct */ | 1102 | struct nfs_writeres res; /* result struct */ |
| 1078 | struct pnfs_layout_segment *lseg; | 1103 | struct pnfs_layout_segment *lseg; |
| 1079 | struct nfs_client *ds_clp; /* pNFS data server */ | 1104 | struct nfs_client *ds_clp; /* pNFS data server */ |
| 1105 | int ds_commit_index; | ||
| 1080 | const struct rpc_call_ops *mds_ops; | 1106 | const struct rpc_call_ops *mds_ops; |
| 1081 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); | 1107 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); |
| 1082 | #ifdef CONFIG_NFS_V4 | 1108 | #ifdef CONFIG_NFS_V4 |
