diff options
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 9a994bc9899f..db52d9658570 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #ifndef FS_NFS_PNFS_H | 30 | #ifndef FS_NFS_PNFS_H |
31 | #define FS_NFS_PNFS_H | 31 | #define FS_NFS_PNFS_H |
32 | 32 | ||
33 | #include <linux/nfs_page.h> | ||
34 | |||
33 | enum { | 35 | enum { |
34 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ | 36 | NFS_LSEG_VALID = 0, /* cleared when lseg is recalled/returned */ |
35 | NFS_LSEG_ROC, /* roc bit received from server */ | 37 | NFS_LSEG_ROC, /* roc bit received from server */ |
@@ -65,6 +67,9 @@ struct pnfs_layoutdriver_type { | |||
65 | int (*clear_layoutdriver) (struct nfs_server *); | 67 | int (*clear_layoutdriver) (struct nfs_server *); |
66 | struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr); | 68 | struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr); |
67 | void (*free_lseg) (struct pnfs_layout_segment *lseg); | 69 | void (*free_lseg) (struct pnfs_layout_segment *lseg); |
70 | |||
71 | /* test for nfs page cache coalescing */ | ||
72 | int (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *); | ||
68 | }; | 73 | }; |
69 | 74 | ||
70 | struct pnfs_layout_hdr { | 75 | struct pnfs_layout_hdr { |
@@ -151,6 +156,7 @@ pnfs_update_layout(struct inode *ino, struct nfs_open_context *ctx, | |||
151 | enum pnfs_iomode access_type); | 156 | enum pnfs_iomode access_type); |
152 | void set_pnfs_layoutdriver(struct nfs_server *, u32 id); | 157 | void set_pnfs_layoutdriver(struct nfs_server *, u32 id); |
153 | void unset_pnfs_layoutdriver(struct nfs_server *); | 158 | void unset_pnfs_layoutdriver(struct nfs_server *); |
159 | void pnfs_pageio_init_read(struct nfs_pageio_descriptor *, struct inode *); | ||
154 | int pnfs_layout_process(struct nfs4_layoutget *lgp); | 160 | int pnfs_layout_process(struct nfs4_layoutget *lgp); |
155 | void pnfs_free_lseg_list(struct list_head *tmp_list); | 161 | void pnfs_free_lseg_list(struct list_head *tmp_list); |
156 | void pnfs_destroy_layout(struct nfs_inode *); | 162 | void pnfs_destroy_layout(struct nfs_inode *); |
@@ -250,6 +256,12 @@ static inline void unset_pnfs_layoutdriver(struct nfs_server *s) | |||
250 | { | 256 | { |
251 | } | 257 | } |
252 | 258 | ||
259 | static inline void | ||
260 | pnfs_pageio_init_read(struct nfs_pageio_descriptor *pgio, struct inode *ino) | ||
261 | { | ||
262 | pgio->pg_test = NULL; | ||
263 | } | ||
264 | |||
253 | #endif /* CONFIG_NFS_V4_1 */ | 265 | #endif /* CONFIG_NFS_V4_1 */ |
254 | 266 | ||
255 | #endif /* FS_NFS_PNFS_H */ | 267 | #endif /* FS_NFS_PNFS_H */ |