summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-06-09 17:48:33 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-06-25 00:46:59 +0200
commit1e7f3a485922211b6e4a082ebc6bf05810b0b6ea (patch)
tree409983ab4e7f9e880f31afd0648eb3ca039e1b5a /include
parentNFSv4: test SECINFO RPC_AUTH_GSS pseudoflavors for support (diff)
downloadlinux-1e7f3a485922211b6e4a082ebc6bf05810b0b6ea.tar.xz
linux-1e7f3a485922211b6e4a082ebc6bf05810b0b6ea.zip
nfs: move nfs_pgio_data and remove nfs_rw_header
nfs_rw_header was used to allocate an nfs_pgio_header along with an nfs_pgio_data, because a _header would need at least one _data. Now there is only ever one nfs_pgio_data for each nfs_pgio_header -- move it to nfs_pgio_header and get rid of nfs_rw_header. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_page.h4
-rw-r--r--include/linux/nfs_xdr.h38
2 files changed, 18 insertions, 24 deletions
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 7d9096d95d4a..43592651cd5a 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -62,8 +62,8 @@ struct nfs_pageio_ops {
struct nfs_rw_ops {
const fmode_t rw_mode;
- struct nfs_rw_header *(*rw_alloc_header)(void);
- void (*rw_free_header)(struct nfs_rw_header *);
+ struct nfs_pgio_header *(*rw_alloc_header)(void);
+ void (*rw_free_header)(struct nfs_pgio_header *);
void (*rw_release)(struct nfs_pgio_data *);
int (*rw_done)(struct rpc_task *, struct nfs_pgio_data *, struct inode *);
void (*rw_result)(struct rpc_task *, struct nfs_pgio_data *);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9a1396e70310..e1c9437e8aac 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1257,13 +1257,27 @@ enum {
NFS_IOHDR_NEED_RESCHED,
};
-struct nfs_pgio_data;
+struct nfs_pgio_data {
+ struct nfs_pgio_header *header;
+ struct list_head list;
+ struct rpc_task task;
+ struct nfs_fattr fattr;
+ struct nfs_writeverf verf; /* Used for writes */
+ struct nfs_pgio_args args; /* argument struct */
+ struct nfs_pgio_res res; /* result struct */
+ unsigned long timestamp; /* For lease renewal */
+ int (*pgio_done_cb)(struct rpc_task *task, struct nfs_pgio_data *data);
+ __u64 mds_offset; /* Filelayout dense stripe */
+ struct nfs_page_array pages;
+ struct nfs_client *ds_clp; /* pNFS data server */
+ int ds_idx; /* ds index if ds_clp is set */
+};
struct nfs_pgio_header {
struct inode *inode;
struct rpc_cred *cred;
struct list_head pages;
- struct nfs_pgio_data *data;
+ struct nfs_pgio_data data;
atomic_t refcnt;
struct nfs_page *req;
struct nfs_writeverf verf; /* Used for writes */
@@ -1283,26 +1297,6 @@ struct nfs_pgio_header {
unsigned long flags;
};
-struct nfs_pgio_data {
- struct nfs_pgio_header *header;
- struct rpc_task task;
- struct nfs_fattr fattr;
- struct nfs_writeverf verf; /* Used for writes */
- struct nfs_pgio_args args; /* argument struct */
- struct nfs_pgio_res res; /* result struct */
- unsigned long timestamp; /* For lease renewal */
- int (*pgio_done_cb) (struct rpc_task *task, struct nfs_pgio_data *data);
- __u64 mds_offset; /* Filelayout dense stripe */
- struct nfs_page_array pages;
- struct nfs_client *ds_clp; /* pNFS data server */
- int ds_idx; /* ds index if ds_clp is set */
-};
-
-struct nfs_rw_header {
- struct nfs_pgio_header header;
- struct nfs_pgio_data rpc_data;
-};
-
struct nfs_mds_commit_info {
atomic_t rpcs_out;
unsigned long ncommit;