aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2011-07-30 20:52:36 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-07-31 12:18:15 -0400
commit738fd0f360359aecc7fcd7604bbe9e854d81fb1f (patch)
treec2d7ba1680ee37383f1fd537cdafba6fef5dfd8e /fs/nfs/client.c
parent7f11d8d38d64739e190581e015a2a2730ff54e2a (diff)
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>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 19ea7d9c75e6..a9b18483cb24 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -904,7 +904,9 @@ error:
904/* 904/*
905 * Load up the server record from information gained in an fsinfo record 905 * Load up the server record from information gained in an fsinfo record
906 */ 906 */
907static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *fsinfo) 907static void nfs_server_set_fsinfo(struct nfs_server *server,
908 struct nfs_fh *mntfh,
909 struct nfs_fsinfo *fsinfo)
908{ 910{
909 unsigned long max_rpc_payload; 911 unsigned long max_rpc_payload;
910 912
@@ -934,7 +936,7 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *
934 if (server->wsize > NFS_MAX_FILE_IO_SIZE) 936 if (server->wsize > NFS_MAX_FILE_IO_SIZE)
935 server->wsize = NFS_MAX_FILE_IO_SIZE; 937 server->wsize = NFS_MAX_FILE_IO_SIZE;
936 server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; 938 server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
937 set_pnfs_layoutdriver(server, fsinfo->layouttype); 939 set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
938 940
939 server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); 941 server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
940 942
@@ -980,7 +982,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
980 if (error < 0) 982 if (error < 0)
981 goto out_error; 983 goto out_error;
982 984
983 nfs_server_set_fsinfo(server, &fsinfo); 985 nfs_server_set_fsinfo(server, mntfh, &fsinfo);
984 986
985 /* Get some general file system info */ 987 /* Get some general file system info */
986 if (server->namelen == 0) { 988 if (server->namelen == 0) {