aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2014-05-06 09:12:30 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-28 18:40:04 -0400
commit4a0de55c565a36cac8422b76a948c4634a90781e (patch)
tree749ab695ab23756f1f7c791a17a2125eac993d9c /fs/nfs/internal.h
parent00bfa30abe86982ce1929e9cabd703e5546106bd (diff)
NFS: Create a common rw_header_alloc and rw_header_free function
I create a new struct nfs_rw_ops to decide the differences between reads and writes. This struct will be set when initializing a new nfs_pgio_descriptor, and then passed on to the nfs_rw_header when a new header is allocated. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 5ddc142c5062..9d6a40eae11c 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -237,6 +237,8 @@ extern void nfs_pgheader_init(struct nfs_pageio_descriptor *desc,
237void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos); 237void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos);
238int nfs_iocounter_wait(struct nfs_io_counter *c); 238int nfs_iocounter_wait(struct nfs_io_counter *c);
239 239
240struct nfs_rw_header *nfs_rw_header_alloc(const struct nfs_rw_ops *);
241void nfs_rw_header_free(struct nfs_pgio_header *);
240struct nfs_pgio_data *nfs_pgio_data_alloc(struct nfs_pgio_header *, unsigned int); 242struct nfs_pgio_data *nfs_pgio_data_alloc(struct nfs_pgio_header *, unsigned int);
241void nfs_pgio_data_release(struct nfs_pgio_data *); 243void nfs_pgio_data_release(struct nfs_pgio_data *);
242 244
@@ -397,8 +399,6 @@ extern int nfs4_get_rootfh(struct nfs_server *server, struct nfs_fh *mntfh, bool
397 399
398struct nfs_pgio_completion_ops; 400struct nfs_pgio_completion_ops;
399/* read.c */ 401/* read.c */
400extern struct nfs_rw_header *nfs_readhdr_alloc(void);
401extern void nfs_readhdr_free(struct nfs_pgio_header *hdr);
402extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, 402extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio,
403 struct inode *inode, bool force_mds, 403 struct inode *inode, bool force_mds,
404 const struct nfs_pgio_completion_ops *compl_ops); 404 const struct nfs_pgio_completion_ops *compl_ops);
@@ -425,8 +425,6 @@ int nfs_remount(struct super_block *sb, int *flags, char *raw_data);
425extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, 425extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio,
426 struct inode *inode, int ioflags, bool force_mds, 426 struct inode *inode, int ioflags, bool force_mds,
427 const struct nfs_pgio_completion_ops *compl_ops); 427 const struct nfs_pgio_completion_ops *compl_ops);
428extern struct nfs_rw_header *nfs_writehdr_alloc(void);
429extern void nfs_writehdr_free(struct nfs_pgio_header *hdr);
430extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, 428extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc,
431 struct nfs_pgio_header *hdr); 429 struct nfs_pgio_header *hdr);
432extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio); 430extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio);