pnfs: add set-clear layoutdriver interface
To allow layout driver to issue getdevicelist at mount time, and clean up at umount time. [fixup non NFS_V4_1 set_pnfs_layoutdriver definition] [pnfs: pass mntfh down the init_pnfs path] Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Benny Halevy <bhalevy@tonian.com> Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
7f11d8d38d
commit
738fd0f360
@ -904,7 +904,9 @@ error:
|
||||
/*
|
||||
* Load up the server record from information gained in an fsinfo record
|
||||
*/
|
||||
static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *fsinfo)
|
||||
static void nfs_server_set_fsinfo(struct nfs_server *server,
|
||||
struct nfs_fh *mntfh,
|
||||
struct nfs_fsinfo *fsinfo)
|
||||
{
|
||||
unsigned long max_rpc_payload;
|
||||
|
||||
@ -934,7 +936,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *
|
||||
if (server->wsize > NFS_MAX_FILE_IO_SIZE)
|
||||
server->wsize = NFS_MAX_FILE_IO_SIZE;
|
||||
server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
|
||||
set_pnfs_layoutdriver(server, fsinfo->layouttype);
|
||||
set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
|
||||
|
||||
server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
|
||||
|
||||
@ -980,7 +982,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
|
||||
if (error < 0)
|
||||
goto out_error;
|
||||
|
||||
nfs_server_set_fsinfo(server, &fsinfo);
|
||||
nfs_server_set_fsinfo(server, mntfh, &fsinfo);
|
||||
|
||||
/* Get some general file system info */
|
||||
if (server->namelen == 0) {
|
||||
|
Reference in New Issue
Block a user