diff options
author | Fred Isaman <iisaman@netapp.com> | 2012-04-20 14:47:57 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-27 14:10:39 -0400 |
commit | 1763da1234cba663b849476d451bdccac5147859 (patch) | |
tree | b2b4bf3e1ce8624217c78508054fc620aac79a55 /fs/nfs/internal.h | |
parent | 56f9cd684d25f1bae901c5a872b8427f8b417c3f (diff) |
NFS: rewrite directio write to use async coalesce code
This also has the advantage that it allows directio to use pnfs.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 137f5cd71433..d68810f61869 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -320,10 +320,11 @@ extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio); | |||
320 | extern void nfs_readdata_release(struct nfs_read_data *rdata); | 320 | extern void nfs_readdata_release(struct nfs_read_data *rdata); |
321 | 321 | ||
322 | /* write.c */ | 322 | /* write.c */ |
323 | extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, | ||
324 | struct inode *inode, int ioflags, | ||
325 | const struct nfs_pgio_completion_ops *compl_ops); | ||
323 | extern struct nfs_write_header *nfs_writehdr_alloc(void); | 326 | extern struct nfs_write_header *nfs_writehdr_alloc(void); |
324 | extern void nfs_writehdr_free(struct nfs_pgio_header *hdr); | 327 | extern void nfs_writehdr_free(struct nfs_pgio_header *hdr); |
325 | extern struct nfs_write_data *nfs_writedata_alloc(struct nfs_pgio_header *hdr, | ||
326 | unsigned int pagecount); | ||
327 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, | 328 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, |
328 | struct nfs_pgio_header *hdr); | 329 | struct nfs_pgio_header *hdr); |
329 | extern void nfs_pageio_init_write_mds(struct nfs_pageio_descriptor *pgio, | 330 | extern void nfs_pageio_init_write_mds(struct nfs_pageio_descriptor *pgio, |
@@ -346,6 +347,15 @@ extern void nfs_init_commit(struct nfs_commit_data *data, | |||
346 | struct list_head *head, | 347 | struct list_head *head, |
347 | struct pnfs_layout_segment *lseg, | 348 | struct pnfs_layout_segment *lseg, |
348 | struct nfs_commit_info *cinfo); | 349 | struct nfs_commit_info *cinfo); |
350 | int nfs_scan_commit_list(struct list_head *src, struct list_head *dst, | ||
351 | struct nfs_commit_info *cinfo, int max); | ||
352 | int nfs_scan_commit(struct inode *inode, struct list_head *dst, | ||
353 | struct nfs_commit_info *cinfo); | ||
354 | void nfs_mark_request_commit(struct nfs_page *req, | ||
355 | struct pnfs_layout_segment *lseg, | ||
356 | struct nfs_commit_info *cinfo); | ||
357 | int nfs_generic_commit_list(struct inode *inode, struct list_head *head, | ||
358 | int how, struct nfs_commit_info *cinfo); | ||
349 | void nfs_retry_commit(struct list_head *page_list, | 359 | void nfs_retry_commit(struct list_head *page_list, |
350 | struct pnfs_layout_segment *lseg, | 360 | struct pnfs_layout_segment *lseg, |
351 | struct nfs_commit_info *cinfo); | 361 | struct nfs_commit_info *cinfo); |
@@ -365,6 +375,10 @@ extern int nfs_migrate_page(struct address_space *, | |||
365 | #define nfs_migrate_page NULL | 375 | #define nfs_migrate_page NULL |
366 | #endif | 376 | #endif |
367 | 377 | ||
378 | /* direct.c */ | ||
379 | void nfs_init_cinfo_from_dreq(struct nfs_commit_info *cinfo, | ||
380 | struct nfs_direct_req *dreq); | ||
381 | |||
368 | /* nfs4proc.c */ | 382 | /* nfs4proc.c */ |
369 | extern void __nfs4_read_done_cb(struct nfs_read_data *); | 383 | extern void __nfs4_read_done_cb(struct nfs_read_data *); |
370 | extern void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data); | 384 | extern void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data); |