aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-06-20 15:53:40 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-29 11:46:43 -0400
commite38eb6506ff426a2bb93433fecfcc863a95fcd03 (patch)
treeb2b4fe8f3456ecf53266fcc36955f9ab3ec9a8ef
parent6e5b587d2f4271a1a4a47e3169db7157aefc31ed (diff)
NFS: set_pnfs_layoutdriver() from nfs4_proc_fsinfo()
The generic client doesn't need to know about pnfs layout drivers, so this should be done in the v4 code. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/client.c1
-rw-r--r--fs/nfs/nfs4proc.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index f005b5bebdc7..e646b14024c1 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -975,7 +975,6 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,
975 server->wsize = NFS_MAX_FILE_IO_SIZE; 975 server->wsize = NFS_MAX_FILE_IO_SIZE;
976 server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; 976 server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
977 server->pnfs_blksize = fsinfo->blksize; 977 server->pnfs_blksize = fsinfo->blksize;
978 set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
979 978
980 server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); 979 server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
981 980
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c84c93c4cd36..e9a8ad2df7af 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3332,8 +3332,14 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
3332 3332
3333static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo) 3333static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
3334{ 3334{
3335 int error;
3336
3335 nfs_fattr_init(fsinfo->fattr); 3337 nfs_fattr_init(fsinfo->fattr);
3336 return nfs4_do_fsinfo(server, fhandle, fsinfo); 3338 error = nfs4_do_fsinfo(server, fhandle, fsinfo);
3339 if (error == 0)
3340 set_pnfs_layoutdriver(server, fhandle, fsinfo->layouttype);
3341
3342 return error;
3337} 3343}
3338 3344
3339static int _nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle, 3345static int _nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,