]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFS: set_pnfs_layoutdriver() from nfs4_proc_fsinfo()
authorBryan Schumaker <bjschuma@netapp.com>
Wed, 20 Jun 2012 19:53:40 +0000 (15:53 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 29 Jun 2012 15:46:43 +0000 (11:46 -0400)
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>
fs/nfs/client.c
fs/nfs/nfs4proc.c

index f005b5bebdc73bba4d548d134699dd4f00c471ca..e646b14024c18f661e87566b1be59d66154f647c 100644 (file)
@@ -975,7 +975,6 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,
                server->wsize = NFS_MAX_FILE_IO_SIZE;
        server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
        server->pnfs_blksize = fsinfo->blksize;
-       set_pnfs_layoutdriver(server, mntfh, fsinfo->layouttype);
 
        server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL);
 
index c84c93c4cd36ba86c1792d239abbb4d0eaa9c2ab..e9a8ad2df7af8eefb45417bbfdcb8096bfbc9692 100644 (file)
@@ -3332,8 +3332,14 @@ static int nfs4_do_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, str
 
 static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
 {
+       int error;
+
        nfs_fattr_init(fsinfo->fattr);
-       return nfs4_do_fsinfo(server, fhandle, fsinfo);
+       error = nfs4_do_fsinfo(server, fhandle, fsinfo);
+       if (error == 0)
+               set_pnfs_layoutdriver(server, fhandle, fsinfo->layouttype);
+
+       return error;
 }
 
 static int _nfs4_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,