]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/nfs_page.h
NFS: Create a common pgio_rpc_prepare function
[karo-tx-linux.git] / include / linux / nfs_page.h
index 92ce5783b707df8ea90306aaf145f1fbba3d02a2..da00a4d6f47091da4b24b35fa91fb997fec8cf97 100644 (file)
@@ -52,6 +52,13 @@ struct nfs_pageio_ops {
        int     (*pg_doio)(struct nfs_pageio_descriptor *);
 };
 
+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 *);
+       void (*rw_release)(struct nfs_pgio_data *);
+};
+
 struct nfs_pageio_descriptor {
        struct list_head        pg_list;
        unsigned long           pg_bytes_written;
@@ -63,6 +70,7 @@ struct nfs_pageio_descriptor {
 
        struct inode            *pg_inode;
        const struct nfs_pageio_ops *pg_ops;
+       const struct nfs_rw_ops *pg_rw_ops;
        int                     pg_ioflags;
        int                     pg_error;
        const struct rpc_call_ops *pg_rpc_callops;
@@ -86,6 +94,7 @@ extern        void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
                             struct inode *inode,
                             const struct nfs_pageio_ops *pg_ops,
                             const struct nfs_pgio_completion_ops *compl_ops,
+                            const struct nfs_rw_ops *rw_ops,
                             size_t bsize,
                             int how);
 extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,