aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 22:16:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 22:16:57 -0400
commit1fad1e9a747687a7399bf58e87974f9b1bbcae06 (patch)
treefde2dc9a35321e21c99e06d4b79d5fa06fd34679 /include
parentbbeb0af25f493261c15ceee176c99b7fd6fd5479 (diff)
parentf44106e2173f08ccb1c9195d85a6c22388b461c1 (diff)
Merge tag 'nfs-for-3.6-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Features include: - More preparatory patches for modularising NFSv2/v3/v4. Split out the various NFSv2/v3/v4-specific code into separate files - More preparation for the NFSv4 migration code - Ensure that OPEN(O_CREATE) observes the pNFS mds threshold parameters - pNFS fast failover when the data servers are down - Various cleanups and debugging patches" * tag 'nfs-for-3.6-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (67 commits) nfs: fix fl_type tests in NFSv4 code NFS: fix pnfs regression with directio writes NFS: fix pnfs regression with directio reads sunrpc: clnt: Add missing braces nfs: fix stub return type warnings NFS: exit_nfs_v4() shouldn't be an __exit function SUNRPC: Add a missing spin_unlock to gss_mech_list_pseudoflavors NFS: Split out NFS v4 client functions NFS: Split out the NFS v4 filesystem types NFS: Create a single nfs_clone_super() function NFS: Split out NFS v4 server creating code NFS: Initialize the NFS v4 client from init_nfs_v4() NFS: Move the v4 getroot code to nfs4getroot.c NFS: Split out NFS v4 file operations NFS: Initialize v4 sysctls from nfs_init_v4() NFS: Create an init_nfs_v4() function NFS: Split out NFS v4 inode operations NFS: Split out NFS v3 inode operations NFS: Split out NFS v2 inode operations NFS: Clean up nfs4_proc_setclientid() and friends ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h8
-rw-r--r--include/linux/nfs_fs_sb.h3
-rw-r--r--include/linux/nfs_page.h2
-rw-r--r--include/linux/nfs_xdr.h16
-rw-r--r--include/linux/sunrpc/auth.h2
-rw-r--r--include/linux/sunrpc/gss_api.h3
-rw-r--r--include/linux/sunrpc/xdr.h6
7 files changed, 24 insertions, 16 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index b23cfc120edb..4b6043c20f77 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -427,10 +427,6 @@ extern __be32 root_nfs_parse_addr(char *name); /*__init*/
427/* 427/*
428 * linux/fs/nfs/file.c 428 * linux/fs/nfs/file.c
429 */ 429 */
430extern const struct inode_operations nfs_file_inode_operations;
431#ifdef CONFIG_NFS_V3
432extern const struct inode_operations nfs3_file_inode_operations;
433#endif /* CONFIG_NFS_V3 */
434extern const struct file_operations nfs_file_operations; 430extern const struct file_operations nfs_file_operations;
435#ifdef CONFIG_NFS_V4 431#ifdef CONFIG_NFS_V4
436extern const struct file_operations nfs4_file_operations; 432extern const struct file_operations nfs4_file_operations;
@@ -485,10 +481,6 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
485/* 481/*
486 * linux/fs/nfs/dir.c 482 * linux/fs/nfs/dir.c
487 */ 483 */
488extern const struct inode_operations nfs_dir_inode_operations;
489#ifdef CONFIG_NFS_V3
490extern const struct inode_operations nfs3_dir_inode_operations;
491#endif /* CONFIG_NFS_V3 */
492extern const struct file_operations nfs_dir_operations; 484extern const struct file_operations nfs_dir_operations;
493extern const struct dentry_operations nfs_dentry_operations; 485extern const struct dentry_operations nfs_dentry_operations;
494 486
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index f58325a1d8fb..65327652c61a 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -69,10 +69,9 @@ struct nfs_client {
69 struct idmap * cl_idmap; 69 struct idmap * cl_idmap;
70 70
71 /* Our own IP address, as a null-terminated string. 71 /* Our own IP address, as a null-terminated string.
72 * This is used to generate the clientid, and the callback address. 72 * This is used to generate the mv0 callback address.
73 */ 73 */
74 char cl_ipaddr[48]; 74 char cl_ipaddr[48];
75 unsigned char cl_id_uniquifier;
76 u32 cl_cb_ident; /* v4.0 callback identifier */ 75 u32 cl_cb_ident; /* v4.0 callback identifier */
77 const struct nfs4_minor_version_ops *cl_mvops; 76 const struct nfs4_minor_version_ops *cl_mvops;
78 77
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 88d166b555e8..880805774f9f 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -42,7 +42,7 @@ struct nfs_page {
42 wb_bytes; /* Length of request */ 42 wb_bytes; /* Length of request */
43 struct kref wb_kref; /* reference count */ 43 struct kref wb_kref; /* reference count */
44 unsigned long wb_flags; 44 unsigned long wb_flags;
45 struct nfs_writeverf wb_verf; /* Commit cookie */ 45 struct nfs_write_verifier wb_verf; /* Commit cookie */
46}; 46};
47 47
48struct nfs_pageio_descriptor; 48struct nfs_pageio_descriptor;
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index d3b7c18b18f4..0e181c2320b7 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -514,9 +514,13 @@ struct nfs_writeargs {
514 struct nfs4_sequence_args seq_args; 514 struct nfs4_sequence_args seq_args;
515}; 515};
516 516
517struct nfs_write_verifier {
518 char data[8];
519};
520
517struct nfs_writeverf { 521struct nfs_writeverf {
522 struct nfs_write_verifier verifier;
518 enum nfs3_stable_how committed; 523 enum nfs3_stable_how committed;
519 __be32 verifier[2];
520}; 524};
521 525
522struct nfs_writeres { 526struct nfs_writeres {
@@ -1349,6 +1353,8 @@ struct nfs_renamedata {
1349struct nfs_access_entry; 1353struct nfs_access_entry;
1350struct nfs_client; 1354struct nfs_client;
1351struct rpc_timeout; 1355struct rpc_timeout;
1356struct nfs_client_initdata;
1357struct nfs_pageio_descriptor;
1352 1358
1353/* 1359/*
1354 * RPC procedure vector for NFSv2/NFSv3 demuxing 1360 * RPC procedure vector for NFSv2/NFSv3 demuxing
@@ -1402,9 +1408,13 @@ struct nfs_rpc_ops {
1402 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1408 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1403 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); 1409 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
1404 void (*read_setup) (struct nfs_read_data *, struct rpc_message *); 1410 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1411 void (*read_pageio_init)(struct nfs_pageio_descriptor *, struct inode *,
1412 const struct nfs_pgio_completion_ops *);
1405 void (*read_rpc_prepare)(struct rpc_task *, struct nfs_read_data *); 1413 void (*read_rpc_prepare)(struct rpc_task *, struct nfs_read_data *);
1406 int (*read_done) (struct rpc_task *, struct nfs_read_data *); 1414 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1407 void (*write_setup) (struct nfs_write_data *, struct rpc_message *); 1415 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
1416 void (*write_pageio_init)(struct nfs_pageio_descriptor *, struct inode *, int,
1417 const struct nfs_pgio_completion_ops *);
1408 void (*write_rpc_prepare)(struct rpc_task *, struct nfs_write_data *); 1418 void (*write_rpc_prepare)(struct rpc_task *, struct nfs_write_data *);
1409 int (*write_done) (struct rpc_task *, struct nfs_write_data *); 1419 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
1410 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); 1420 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *);
@@ -1418,9 +1428,13 @@ struct nfs_rpc_ops {
1418 struct nfs_open_context *ctx, 1428 struct nfs_open_context *ctx,
1419 int open_flags, 1429 int open_flags,
1420 struct iattr *iattr); 1430 struct iattr *iattr);
1431 int (*have_delegation)(struct inode *, fmode_t);
1432 int (*return_delegation)(struct inode *);
1433 struct nfs_client *(*alloc_client) (const struct nfs_client_initdata *);
1421 struct nfs_client * 1434 struct nfs_client *
1422 (*init_client) (struct nfs_client *, const struct rpc_timeout *, 1435 (*init_client) (struct nfs_client *, const struct rpc_timeout *,
1423 const char *, rpc_authflavor_t); 1436 const char *, rpc_authflavor_t);
1437 void (*free_client) (struct nfs_client *);
1424}; 1438};
1425 1439
1426/* 1440/*
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 492a36d72829..f25ba922baaf 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -101,6 +101,7 @@ struct rpc_authops {
101 struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int); 101 struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int);
102 int (*pipes_create)(struct rpc_auth *); 102 int (*pipes_create)(struct rpc_auth *);
103 void (*pipes_destroy)(struct rpc_auth *); 103 void (*pipes_destroy)(struct rpc_auth *);
104 int (*list_pseudoflavors)(rpc_authflavor_t *, int);
104}; 105};
105 106
106struct rpc_credops { 107struct rpc_credops {
@@ -135,6 +136,7 @@ int rpcauth_register(const struct rpc_authops *);
135int rpcauth_unregister(const struct rpc_authops *); 136int rpcauth_unregister(const struct rpc_authops *);
136struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); 137struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *);
137void rpcauth_release(struct rpc_auth *); 138void rpcauth_release(struct rpc_auth *);
139int rpcauth_list_flavors(rpc_authflavor_t *, int);
138struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); 140struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int);
139void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); 141void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *);
140struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); 142struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h
index 332da61cf8b7..a19e2547ae6a 100644
--- a/include/linux/sunrpc/gss_api.h
+++ b/include/linux/sunrpc/gss_api.h
@@ -14,6 +14,7 @@
14 14
15#ifdef __KERNEL__ 15#ifdef __KERNEL__
16#include <linux/sunrpc/xdr.h> 16#include <linux/sunrpc/xdr.h>
17#include <linux/sunrpc/msg_prot.h>
17#include <linux/uio.h> 18#include <linux/uio.h>
18 19
19/* The mechanism-independent gss-api context: */ 20/* The mechanism-independent gss-api context: */
@@ -127,7 +128,7 @@ struct gss_api_mech *gss_mech_get_by_name(const char *);
127struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); 128struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);
128 129
129/* Fill in an array with a list of supported pseudoflavors */ 130/* Fill in an array with a list of supported pseudoflavors */
130int gss_mech_list_pseudoflavors(u32 *); 131int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int);
131 132
132/* Just increments the mechanism's reference count and returns its input: */ 133/* Just increments the mechanism's reference count and returns its input: */
133struct gss_api_mech * gss_mech_get(struct gss_api_mech *); 134struct gss_api_mech * gss_mech_get(struct gss_api_mech *);
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index af70af333546..63988990bd36 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -104,8 +104,6 @@ __be32 *xdr_decode_string_inplace(__be32 *p, char **sp, unsigned int *lenp,
104__be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *); 104__be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *);
105__be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *); 105__be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *);
106 106
107void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int,
108 unsigned int);
109void xdr_inline_pages(struct xdr_buf *, unsigned int, 107void xdr_inline_pages(struct xdr_buf *, unsigned int,
110 struct page **, unsigned int, unsigned int); 108 struct page **, unsigned int, unsigned int);
111void xdr_terminate_string(struct xdr_buf *, const u32); 109void xdr_terminate_string(struct xdr_buf *, const u32);
@@ -205,6 +203,7 @@ struct xdr_stream {
205 struct kvec *iov; /* pointer to the current kvec */ 203 struct kvec *iov; /* pointer to the current kvec */
206 struct kvec scratch; /* Scratch buffer */ 204 struct kvec scratch; /* Scratch buffer */
207 struct page **page_ptr; /* pointer to the current page */ 205 struct page **page_ptr; /* pointer to the current page */
206 unsigned int nwords; /* Remaining decode buffer length */
208}; 207};
209 208
210/* 209/*
@@ -217,12 +216,13 @@ extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32
217extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); 216extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
218extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, 217extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,
219 unsigned int base, unsigned int len); 218 unsigned int base, unsigned int len);
219extern unsigned int xdr_stream_pos(const struct xdr_stream *xdr);
220extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); 220extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);
221extern void xdr_init_decode_pages(struct xdr_stream *xdr, struct xdr_buf *buf, 221extern void xdr_init_decode_pages(struct xdr_stream *xdr, struct xdr_buf *buf,
222 struct page **pages, unsigned int len); 222 struct page **pages, unsigned int len);
223extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen); 223extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen);
224extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); 224extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes);
225extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); 225extern unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
226extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); 226extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len);
227extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data); 227extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data);
228 228