NFS41: add pg_layout_private to nfs_pageio_descriptor
authorPeng Tao <bergwolf@gmail.com>
Thu, 2 Aug 2012 12:36:09 +0000 (15:36 +0300)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 2 Aug 2012 21:41:18 +0000 (17:41 -0400)
To allow layout driver to pass private information around
pg_init/pg_doio.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pagelist.c
include/linux/nfs_page.h
include/linux/nfs_xdr.h

index 1a6732ed04a447aa14147468e15f4b7956557376..311a79681e2b16311724e25921d922768c999026 100644 (file)
@@ -49,6 +49,7 @@ void nfs_pgheader_init(struct nfs_pageio_descriptor *desc,
        hdr->io_start = req_offset(hdr->req);
        hdr->good_bytes = desc->pg_count;
        hdr->dreq = desc->pg_dreq;
+       hdr->layout_private = desc->pg_layout_private;
        hdr->release = release;
        hdr->completion_ops = desc->pg_completion_ops;
        if (hdr->completion_ops->init_hdr)
@@ -268,6 +269,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
        desc->pg_error = 0;
        desc->pg_lseg = NULL;
        desc->pg_dreq = NULL;
+       desc->pg_layout_private = NULL;
 }
 EXPORT_SYMBOL_GPL(nfs_pageio_init);
 
index 880805774f9f105425a7eade9721b9965f7d43c9..92ce5783b707df8ea90306aaf145f1fbba3d02a2 100644 (file)
@@ -69,6 +69,7 @@ struct nfs_pageio_descriptor {
        const struct nfs_pgio_completion_ops *pg_completion_ops;
        struct pnfs_layout_segment *pg_lseg;
        struct nfs_direct_req   *pg_dreq;
+       void                    *pg_layout_private;
 };
 
 #define NFS_WBACK_BUSY(req)    (test_bit(PG_BUSY,&(req)->wb_flags))
index 00485e084394d4ca1a5782b3cd54fc63e9b06acd..ac7c8ae254f251933e48f04d5c877eaaa3ec6e09 100644 (file)
@@ -1248,6 +1248,7 @@ struct nfs_pgio_header {
        void (*release) (struct nfs_pgio_header *hdr);
        const struct nfs_pgio_completion_ops *completion_ops;
        struct nfs_direct_req   *dreq;
+       void                    *layout_private;
        spinlock_t              lock;
        /* fields protected by lock */
        int                     pnfs_error;