Commit e9643fe8 authored by Benny Halevy's avatar Benny Halevy Committed by Trond Myklebust

pnfsblock: use pageio_ops api

[pnfsblock: use pnfs_generic_pg_init_read/write]
Signed-off-by: default avatarPeng Tao <peng_tao@emc.com>
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJim Rees <rees@umich.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 155e7524
...@@ -135,6 +135,18 @@ bl_clear_layoutdriver(struct nfs_server *server) ...@@ -135,6 +135,18 @@ bl_clear_layoutdriver(struct nfs_server *server)
return 0; return 0;
} }
static const struct nfs_pageio_ops bl_pg_read_ops = {
.pg_init = pnfs_generic_pg_init_read,
.pg_test = pnfs_generic_pg_test,
.pg_doio = pnfs_generic_pg_readpages,
};
static const struct nfs_pageio_ops bl_pg_write_ops = {
.pg_init = pnfs_generic_pg_init_write,
.pg_test = pnfs_generic_pg_test,
.pg_doio = pnfs_generic_pg_writepages,
};
static struct pnfs_layoutdriver_type blocklayout_type = { static struct pnfs_layoutdriver_type blocklayout_type = {
.id = LAYOUT_BLOCK_VOLUME, .id = LAYOUT_BLOCK_VOLUME,
.name = "LAYOUT_BLOCK_VOLUME", .name = "LAYOUT_BLOCK_VOLUME",
...@@ -148,6 +160,8 @@ static struct pnfs_layoutdriver_type blocklayout_type = { ...@@ -148,6 +160,8 @@ static struct pnfs_layoutdriver_type blocklayout_type = {
.cleanup_layoutcommit = bl_cleanup_layoutcommit, .cleanup_layoutcommit = bl_cleanup_layoutcommit,
.set_layoutdriver = bl_set_layoutdriver, .set_layoutdriver = bl_set_layoutdriver,
.clear_layoutdriver = bl_clear_layoutdriver, .clear_layoutdriver = bl_clear_layoutdriver,
.pg_read_ops = &bl_pg_read_ops,
.pg_write_ops = &bl_pg_write_ops,
}; };
static int __init nfs4blocklayout_init(void) static int __init nfs4blocklayout_init(void)
......
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