diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 12:52:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 12:52:09 -0400 |
commit | a4dd8dce14014665862ce7911b38cb2c69e366dd (patch) | |
tree | 00e79b2845d5d49abcd83cf253db83a52d482265 /fs/nfs/client.c | |
parent | b18cae4224bde7e5a332c19bc99247b2098ea232 (diff) | |
parent | 411b5e05617593efebc06241dbc56f42150f2abe (diff) |
Merge branch 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
net/sunrpc: Use static const char arrays
nfs4: fix channel attribute sanity-checks
NFSv4.1: Use more sensible names for 'initialize_mountpoint'
NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
NFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
NFS: client needs to maintain list of inodes with active layouts
NFS: create and destroy inode's layout cache
NFSv4.1: pnfs: filelayout: introduce minimal file layout driver
NFSv4.1: pnfs: full mount/umount infrastructure
NFS: set layout driver
NFS: ask for layouttypes during v4 fsinfo call
NFS: change stateid to be a union
NFSv4.1: pnfsd, pnfs: protocol level pnfs constants
SUNRPC: define xdr_decode_opaque_fixed
NFSD: remove duplicate NFS4_STATEID_SIZE
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index a882785eba41..fd6f0a70021b 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "iostat.h" | 48 | #include "iostat.h" |
49 | #include "internal.h" | 49 | #include "internal.h" |
50 | #include "fscache.h" | 50 | #include "fscache.h" |
51 | #include "pnfs.h" | ||
51 | 52 | ||
52 | #define NFSDBG_FACILITY NFSDBG_CLIENT | 53 | #define NFSDBG_FACILITY NFSDBG_CLIENT |
53 | 54 | ||
@@ -155,7 +156,9 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_ | |||
155 | cred = rpc_lookup_machine_cred(); | 156 | cred = rpc_lookup_machine_cred(); |
156 | if (!IS_ERR(cred)) | 157 | if (!IS_ERR(cred)) |
157 | clp->cl_machine_cred = cred; | 158 | clp->cl_machine_cred = cred; |
158 | 159 | #if defined(CONFIG_NFS_V4_1) | |
160 | INIT_LIST_HEAD(&clp->cl_layouts); | ||
161 | #endif | ||
159 | nfs_fscache_get_client_cookie(clp); | 162 | nfs_fscache_get_client_cookie(clp); |
160 | 163 | ||
161 | return clp; | 164 | return clp; |
@@ -252,6 +255,7 @@ void nfs_put_client(struct nfs_client *clp) | |||
252 | nfs_free_client(clp); | 255 | nfs_free_client(clp); |
253 | } | 256 | } |
254 | } | 257 | } |
258 | EXPORT_SYMBOL_GPL(nfs_put_client); | ||
255 | 259 | ||
256 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 260 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
257 | /* | 261 | /* |
@@ -900,6 +904,8 @@ static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo * | |||
900 | if (server->wsize > NFS_MAX_FILE_IO_SIZE) | 904 | if (server->wsize > NFS_MAX_FILE_IO_SIZE) |
901 | server->wsize = NFS_MAX_FILE_IO_SIZE; | 905 | server->wsize = NFS_MAX_FILE_IO_SIZE; |
902 | server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | 906 | server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; |
907 | set_pnfs_layoutdriver(server, fsinfo->layouttype); | ||
908 | |||
903 | server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); | 909 | server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); |
904 | 910 | ||
905 | server->dtsize = nfs_block_size(fsinfo->dtpref, NULL); | 911 | server->dtsize = nfs_block_size(fsinfo->dtpref, NULL); |
@@ -939,6 +945,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str | |||
939 | } | 945 | } |
940 | 946 | ||
941 | fsinfo.fattr = fattr; | 947 | fsinfo.fattr = fattr; |
948 | fsinfo.layouttype = 0; | ||
942 | error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo); | 949 | error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo); |
943 | if (error < 0) | 950 | if (error < 0) |
944 | goto out_error; | 951 | goto out_error; |
@@ -1021,6 +1028,7 @@ void nfs_free_server(struct nfs_server *server) | |||
1021 | { | 1028 | { |
1022 | dprintk("--> nfs_free_server()\n"); | 1029 | dprintk("--> nfs_free_server()\n"); |
1023 | 1030 | ||
1031 | unset_pnfs_layoutdriver(server); | ||
1024 | spin_lock(&nfs_client_lock); | 1032 | spin_lock(&nfs_client_lock); |
1025 | list_del(&server->client_link); | 1033 | list_del(&server->client_link); |
1026 | list_del(&server->master_link); | 1034 | list_del(&server->master_link); |