diff options
author | Benny Halevy <bhalevy@panasas.com> | 2011-07-30 20:52:40 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-31 12:18:15 -0400 |
commit | e9643fe80d1a1e0ad6acdf43138c39b5709fdbbe (patch) | |
tree | 294a606cf46942f33e5ffc56fa93ce620690ed55 /fs/nfs/blocklayout | |
parent | 155e7524f28fa374da041434085050693c3df45b (diff) |
pnfsblock: use pageio_ops api
[pnfsblock: use pnfs_generic_pg_init_read/write]
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Jim Rees <rees@umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/blocklayout')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 44562cbbe394..1f5287c2230a 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -135,6 +135,18 @@ bl_clear_layoutdriver(struct nfs_server *server) | |||
135 | return 0; | 135 | return 0; |
136 | } | 136 | } |
137 | 137 | ||
138 | static const struct nfs_pageio_ops bl_pg_read_ops = { | ||
139 | .pg_init = pnfs_generic_pg_init_read, | ||
140 | .pg_test = pnfs_generic_pg_test, | ||
141 | .pg_doio = pnfs_generic_pg_readpages, | ||
142 | }; | ||
143 | |||
144 | static const struct nfs_pageio_ops bl_pg_write_ops = { | ||
145 | .pg_init = pnfs_generic_pg_init_write, | ||
146 | .pg_test = pnfs_generic_pg_test, | ||
147 | .pg_doio = pnfs_generic_pg_writepages, | ||
148 | }; | ||
149 | |||
138 | static struct pnfs_layoutdriver_type blocklayout_type = { | 150 | static struct pnfs_layoutdriver_type blocklayout_type = { |
139 | .id = LAYOUT_BLOCK_VOLUME, | 151 | .id = LAYOUT_BLOCK_VOLUME, |
140 | .name = "LAYOUT_BLOCK_VOLUME", | 152 | .name = "LAYOUT_BLOCK_VOLUME", |
@@ -148,6 +160,8 @@ static struct pnfs_layoutdriver_type blocklayout_type = { | |||
148 | .cleanup_layoutcommit = bl_cleanup_layoutcommit, | 160 | .cleanup_layoutcommit = bl_cleanup_layoutcommit, |
149 | .set_layoutdriver = bl_set_layoutdriver, | 161 | .set_layoutdriver = bl_set_layoutdriver, |
150 | .clear_layoutdriver = bl_clear_layoutdriver, | 162 | .clear_layoutdriver = bl_clear_layoutdriver, |
163 | .pg_read_ops = &bl_pg_read_ops, | ||
164 | .pg_write_ops = &bl_pg_write_ops, | ||
151 | }; | 165 | }; |
152 | 166 | ||
153 | static int __init nfs4blocklayout_init(void) | 167 | static int __init nfs4blocklayout_init(void) |