diff options
author | Anna Schumaker <Anna.Schumaker@netapp.com> | 2014-05-06 09:12:30 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-05-28 18:40:04 -0400 |
commit | 4a0de55c565a36cac8422b76a948c4634a90781e (patch) | |
tree | 749ab695ab23756f1f7c791a17a2125eac993d9c /fs/nfs/internal.h | |
parent | 00bfa30abe86982ce1929e9cabd703e5546106bd (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.h | 6 |
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, | |||
237 | void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos); | 237 | void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos); |
238 | int nfs_iocounter_wait(struct nfs_io_counter *c); | 238 | int nfs_iocounter_wait(struct nfs_io_counter *c); |
239 | 239 | ||
240 | struct nfs_rw_header *nfs_rw_header_alloc(const struct nfs_rw_ops *); | ||
241 | void nfs_rw_header_free(struct nfs_pgio_header *); | ||
240 | struct nfs_pgio_data *nfs_pgio_data_alloc(struct nfs_pgio_header *, unsigned int); | 242 | struct nfs_pgio_data *nfs_pgio_data_alloc(struct nfs_pgio_header *, unsigned int); |
241 | void nfs_pgio_data_release(struct nfs_pgio_data *); | 243 | void 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 | ||
398 | struct nfs_pgio_completion_ops; | 400 | struct nfs_pgio_completion_ops; |
399 | /* read.c */ | 401 | /* read.c */ |
400 | extern struct nfs_rw_header *nfs_readhdr_alloc(void); | ||
401 | extern void nfs_readhdr_free(struct nfs_pgio_header *hdr); | ||
402 | extern void nfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, | 402 | extern 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); | |||
425 | extern void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, | 425 | extern 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); |
428 | extern struct nfs_rw_header *nfs_writehdr_alloc(void); | ||
429 | extern void nfs_writehdr_free(struct nfs_pgio_header *hdr); | ||
430 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, | 428 | extern int nfs_generic_flush(struct nfs_pageio_descriptor *desc, |
431 | struct nfs_pgio_header *hdr); | 429 | struct nfs_pgio_header *hdr); |
432 | extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio); | 430 | extern void nfs_pageio_reset_write_mds(struct nfs_pageio_descriptor *pgio); |