Commit f6166384 authored by Peng Tao's avatar Peng Tao Committed by Trond Myklebust

NFS41: add pg_layout_private to nfs_pageio_descriptor

To allow layout driver to pass private information around
pg_init/pg_doio.
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 21d1f58a
...@@ -49,6 +49,7 @@ void nfs_pgheader_init(struct nfs_pageio_descriptor *desc, ...@@ -49,6 +49,7 @@ void nfs_pgheader_init(struct nfs_pageio_descriptor *desc,
hdr->io_start = req_offset(hdr->req); hdr->io_start = req_offset(hdr->req);
hdr->good_bytes = desc->pg_count; hdr->good_bytes = desc->pg_count;
hdr->dreq = desc->pg_dreq; hdr->dreq = desc->pg_dreq;
hdr->layout_private = desc->pg_layout_private;
hdr->release = release; hdr->release = release;
hdr->completion_ops = desc->pg_completion_ops; hdr->completion_ops = desc->pg_completion_ops;
if (hdr->completion_ops->init_hdr) if (hdr->completion_ops->init_hdr)
...@@ -268,6 +269,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc, ...@@ -268,6 +269,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
desc->pg_error = 0; desc->pg_error = 0;
desc->pg_lseg = NULL; desc->pg_lseg = NULL;
desc->pg_dreq = NULL; desc->pg_dreq = NULL;
desc->pg_layout_private = NULL;
} }
EXPORT_SYMBOL_GPL(nfs_pageio_init); EXPORT_SYMBOL_GPL(nfs_pageio_init);
......
...@@ -69,6 +69,7 @@ struct nfs_pageio_descriptor { ...@@ -69,6 +69,7 @@ struct nfs_pageio_descriptor {
const struct nfs_pgio_completion_ops *pg_completion_ops; const struct nfs_pgio_completion_ops *pg_completion_ops;
struct pnfs_layout_segment *pg_lseg; struct pnfs_layout_segment *pg_lseg;
struct nfs_direct_req *pg_dreq; struct nfs_direct_req *pg_dreq;
void *pg_layout_private;
}; };
#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
......
...@@ -1248,6 +1248,7 @@ struct nfs_pgio_header { ...@@ -1248,6 +1248,7 @@ struct nfs_pgio_header {
void (*release) (struct nfs_pgio_header *hdr); void (*release) (struct nfs_pgio_header *hdr);
const struct nfs_pgio_completion_ops *completion_ops; const struct nfs_pgio_completion_ops *completion_ops;
struct nfs_direct_req *dreq; struct nfs_direct_req *dreq;
void *layout_private;
spinlock_t lock; spinlock_t lock;
/* fields protected by lock */ /* fields protected by lock */
int pnfs_error; int pnfs_error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment