aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-13 20:13:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-13 20:13:19 -0400
commit06b8ab55289345ab191bf4bf0e4acc6d4bdf293d (patch)
tree9af9215097e26c026f30a58c6ca3092ec15d1e1e /include/linux
parentdc1cc85133120e49c223f36aa77d398b8abac727 (diff)
parent71a6ec8ac587418ceb6b420def1ca44b334c1ff7 (diff)
Merge tag 'nfs-for-3.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: - stable fix for a bug in nfs3_list_one_acl() - speed up NFS path walks by supporting LOOKUP_RCU - more read/write code cleanups - pNFS fixes for layout return on close - fixes for the RCU handling in the rpcsec_gss code - more NFS/RDMA fixes" * tag 'nfs-for-3.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits) nfs: reject changes to resvport and sharecache during remount NFS: Avoid infinite loop when RELEASE_LOCKOWNER getting expired error SUNRPC: remove all refcounting of groupinfo from rpcauth_lookupcred NFS: fix two problems in lookup_revalidate in RCU-walk NFS: allow lockless access to access_cache NFS: teach nfs_lookup_verify_inode to handle LOOKUP_RCU NFS: teach nfs_neg_need_reval to understand LOOKUP_RCU NFS: support RCU_WALK in nfs_permission() sunrpc/auth: allow lockless (rcu) lookup of credential cache. NFS: prepare for RCU-walk support but pushing tests later in code. NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used. NFS: add checks for returned value of try_module_get() nfs: clear_request_commit while holding i_lock pnfs: add pnfs_put_lseg_async pnfs: find swapped pages on pnfs commit lists too nfs: fix comment and add warn_on for PG_INODE_REF nfs: check wait_on_bit_lock err in page_group_lock sunrpc: remove "ec" argument from encrypt_v2 operation sunrpc: clean up sparse endianness warnings in gss_krb5_wrap.c sunrpc: clean up sparse endianness warnings in gss_krb5_seal.c ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/nfs_fs_sb.h1
-rw-r--r--include/linux/nfs_page.h19
-rw-r--r--include/linux/nfs_xdr.h34
-rw-r--r--include/linux/sunrpc/auth.h4
-rw-r--r--include/linux/sunrpc/auth_gss.h3
-rw-r--r--include/linux/sunrpc/gss_krb5.h4
-rw-r--r--include/linux/sunrpc/xprtrdma.h2
8 files changed, 34 insertions, 35 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index e30f6059ecd6..5180a7ededec 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -52,6 +52,7 @@ struct nfs_access_entry {
52 unsigned long jiffies; 52 unsigned long jiffies;
53 struct rpc_cred * cred; 53 struct rpc_cred * cred;
54 int mask; 54 int mask;
55 struct rcu_head rcu_head;
55}; 56};
56 57
57struct nfs_lockowner { 58struct nfs_lockowner {
@@ -352,6 +353,7 @@ extern int nfs_release(struct inode *, struct file *);
352extern int nfs_attribute_timeout(struct inode *inode); 353extern int nfs_attribute_timeout(struct inode *inode);
353extern int nfs_attribute_cache_expired(struct inode *inode); 354extern int nfs_attribute_cache_expired(struct inode *inode);
354extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); 355extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
356extern int nfs_revalidate_inode_rcu(struct nfs_server *server, struct inode *inode);
355extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); 357extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
356extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); 358extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
357extern int nfs_setattr(struct dentry *, struct iattr *); 359extern int nfs_setattr(struct dentry *, struct iattr *);
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 1150ea41b626..922be2e050f5 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -45,6 +45,7 @@ struct nfs_client {
45 struct sockaddr_storage cl_addr; /* server identifier */ 45 struct sockaddr_storage cl_addr; /* server identifier */
46 size_t cl_addrlen; 46 size_t cl_addrlen;
47 char * cl_hostname; /* hostname of server */ 47 char * cl_hostname; /* hostname of server */
48 char * cl_acceptor; /* GSSAPI acceptor name */
48 struct list_head cl_share_link; /* link in global client list */ 49 struct list_head cl_share_link; /* link in global client list */
49 struct list_head cl_superblocks; /* List of nfs_server structs */ 50 struct list_head cl_superblocks; /* List of nfs_server structs */
50 51
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 7d9096d95d4a..6ad2bbcad405 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -26,7 +26,7 @@ enum {
26 PG_MAPPED, /* page private set for buffered io */ 26 PG_MAPPED, /* page private set for buffered io */
27 PG_CLEAN, /* write succeeded */ 27 PG_CLEAN, /* write succeeded */
28 PG_COMMIT_TO_DS, /* used by pnfs layouts */ 28 PG_COMMIT_TO_DS, /* used by pnfs layouts */
29 PG_INODE_REF, /* extra ref held by inode (head req only) */ 29 PG_INODE_REF, /* extra ref held by inode when in writeback */
30 PG_HEADLOCK, /* page group lock of wb_head */ 30 PG_HEADLOCK, /* page group lock of wb_head */
31 PG_TEARDOWN, /* page group sync for destroy */ 31 PG_TEARDOWN, /* page group sync for destroy */
32 PG_UNLOCKPAGE, /* page group sync bit in read path */ 32 PG_UNLOCKPAGE, /* page group sync bit in read path */
@@ -62,12 +62,13 @@ struct nfs_pageio_ops {
62 62
63struct nfs_rw_ops { 63struct nfs_rw_ops {
64 const fmode_t rw_mode; 64 const fmode_t rw_mode;
65 struct nfs_rw_header *(*rw_alloc_header)(void); 65 struct nfs_pgio_header *(*rw_alloc_header)(void);
66 void (*rw_free_header)(struct nfs_rw_header *); 66 void (*rw_free_header)(struct nfs_pgio_header *);
67 void (*rw_release)(struct nfs_pgio_data *); 67 void (*rw_release)(struct nfs_pgio_header *);
68 int (*rw_done)(struct rpc_task *, struct nfs_pgio_data *, struct inode *); 68 int (*rw_done)(struct rpc_task *, struct nfs_pgio_header *,
69 void (*rw_result)(struct rpc_task *, struct nfs_pgio_data *); 69 struct inode *);
70 void (*rw_initiate)(struct nfs_pgio_data *, struct rpc_message *, 70 void (*rw_result)(struct rpc_task *, struct nfs_pgio_header *);
71 void (*rw_initiate)(struct nfs_pgio_header *, struct rpc_message *,
71 struct rpc_task_setup *, int); 72 struct rpc_task_setup *, int);
72}; 73};
73 74
@@ -111,6 +112,8 @@ extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
111 int how); 112 int how);
112extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, 113extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
113 struct nfs_page *); 114 struct nfs_page *);
115extern int nfs_pageio_resend(struct nfs_pageio_descriptor *,
116 struct nfs_pgio_header *);
114extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); 117extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc);
115extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); 118extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t);
116extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, 119extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
@@ -119,7 +122,7 @@ extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc,
119extern int nfs_wait_on_request(struct nfs_page *); 122extern int nfs_wait_on_request(struct nfs_page *);
120extern void nfs_unlock_request(struct nfs_page *req); 123extern void nfs_unlock_request(struct nfs_page *req);
121extern void nfs_unlock_and_release_request(struct nfs_page *); 124extern void nfs_unlock_and_release_request(struct nfs_page *);
122extern void nfs_page_group_lock(struct nfs_page *); 125extern int nfs_page_group_lock(struct nfs_page *, bool);
123extern void nfs_page_group_unlock(struct nfs_page *); 126extern void nfs_page_group_unlock(struct nfs_page *);
124extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int); 127extern bool nfs_page_group_sync_on_bit(struct nfs_page *, unsigned int);
125 128
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9a1396e70310..0040629894df 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -993,6 +993,7 @@ struct nfs4_setclientid {
993 unsigned int sc_uaddr_len; 993 unsigned int sc_uaddr_len;
994 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1]; 994 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
995 u32 sc_cb_ident; 995 u32 sc_cb_ident;
996 struct rpc_cred *sc_cred;
996}; 997};
997 998
998struct nfs4_setclientid_res { 999struct nfs4_setclientid_res {
@@ -1253,18 +1254,12 @@ enum {
1253 NFS_IOHDR_ERROR = 0, 1254 NFS_IOHDR_ERROR = 0,
1254 NFS_IOHDR_EOF, 1255 NFS_IOHDR_EOF,
1255 NFS_IOHDR_REDO, 1256 NFS_IOHDR_REDO,
1256 NFS_IOHDR_NEED_COMMIT,
1257 NFS_IOHDR_NEED_RESCHED,
1258}; 1257};
1259 1258
1260struct nfs_pgio_data;
1261
1262struct nfs_pgio_header { 1259struct nfs_pgio_header {
1263 struct inode *inode; 1260 struct inode *inode;
1264 struct rpc_cred *cred; 1261 struct rpc_cred *cred;
1265 struct list_head pages; 1262 struct list_head pages;
1266 struct nfs_pgio_data *data;
1267 atomic_t refcnt;
1268 struct nfs_page *req; 1263 struct nfs_page *req;
1269 struct nfs_writeverf verf; /* Used for writes */ 1264 struct nfs_writeverf verf; /* Used for writes */
1270 struct pnfs_layout_segment *lseg; 1265 struct pnfs_layout_segment *lseg;
@@ -1281,28 +1276,22 @@ struct nfs_pgio_header {
1281 int error; /* merge with pnfs_error */ 1276 int error; /* merge with pnfs_error */
1282 unsigned long good_bytes; /* boundary of good data */ 1277 unsigned long good_bytes; /* boundary of good data */
1283 unsigned long flags; 1278 unsigned long flags;
1284};
1285 1279
1286struct nfs_pgio_data { 1280 /*
1287 struct nfs_pgio_header *header; 1281 * rpc data
1282 */
1288 struct rpc_task task; 1283 struct rpc_task task;
1289 struct nfs_fattr fattr; 1284 struct nfs_fattr fattr;
1290 struct nfs_writeverf verf; /* Used for writes */
1291 struct nfs_pgio_args args; /* argument struct */ 1285 struct nfs_pgio_args args; /* argument struct */
1292 struct nfs_pgio_res res; /* result struct */ 1286 struct nfs_pgio_res res; /* result struct */
1293 unsigned long timestamp; /* For lease renewal */ 1287 unsigned long timestamp; /* For lease renewal */
1294 int (*pgio_done_cb) (struct rpc_task *task, struct nfs_pgio_data *data); 1288 int (*pgio_done_cb)(struct rpc_task *, struct nfs_pgio_header *);
1295 __u64 mds_offset; /* Filelayout dense stripe */ 1289 __u64 mds_offset; /* Filelayout dense stripe */
1296 struct nfs_page_array pages; 1290 struct nfs_page_array page_array;
1297 struct nfs_client *ds_clp; /* pNFS data server */ 1291 struct nfs_client *ds_clp; /* pNFS data server */
1298 int ds_idx; /* ds index if ds_clp is set */ 1292 int ds_idx; /* ds index if ds_clp is set */
1299}; 1293};
1300 1294
1301struct nfs_rw_header {
1302 struct nfs_pgio_header header;
1303 struct nfs_pgio_data rpc_data;
1304};
1305
1306struct nfs_mds_commit_info { 1295struct nfs_mds_commit_info {
1307 atomic_t rpcs_out; 1296 atomic_t rpcs_out;
1308 unsigned long ncommit; 1297 unsigned long ncommit;
@@ -1432,11 +1421,12 @@ struct nfs_rpc_ops {
1432 struct nfs_pathconf *); 1421 struct nfs_pathconf *);
1433 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1422 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1434 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); 1423 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
1435 int (*pgio_rpc_prepare)(struct rpc_task *, struct nfs_pgio_data *); 1424 int (*pgio_rpc_prepare)(struct rpc_task *,
1436 void (*read_setup) (struct nfs_pgio_data *, struct rpc_message *); 1425 struct nfs_pgio_header *);
1437 int (*read_done) (struct rpc_task *, struct nfs_pgio_data *); 1426 void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *);
1438 void (*write_setup) (struct nfs_pgio_data *, struct rpc_message *); 1427 int (*read_done)(struct rpc_task *, struct nfs_pgio_header *);
1439 int (*write_done) (struct rpc_task *, struct nfs_pgio_data *); 1428 void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *);
1429 int (*write_done)(struct rpc_task *, struct nfs_pgio_header *);
1440 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *); 1430 void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *);
1441 void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *); 1431 void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *);
1442 int (*commit_done) (struct rpc_task *, struct nfs_commit_data *); 1432 int (*commit_done) (struct rpc_task *, struct nfs_commit_data *);
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 790be1472792..8e030075fe79 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -103,6 +103,7 @@ struct rpc_auth_create_args {
103 103
104/* Flags for rpcauth_lookupcred() */ 104/* Flags for rpcauth_lookupcred() */
105#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ 105#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
106#define RPCAUTH_LOOKUP_RCU 0x02 /* lock-less lookup */
106 107
107/* 108/*
108 * Client authentication ops 109 * Client authentication ops
@@ -140,6 +141,7 @@ struct rpc_credops {
140 void *, __be32 *, void *); 141 void *, __be32 *, void *);
141 int (*crkey_timeout)(struct rpc_cred *); 142 int (*crkey_timeout)(struct rpc_cred *);
142 bool (*crkey_to_expire)(struct rpc_cred *); 143 bool (*crkey_to_expire)(struct rpc_cred *);
144 char * (*crstringify_acceptor)(struct rpc_cred *);
143}; 145};
144 146
145extern const struct rpc_authops authunix_ops; 147extern const struct rpc_authops authunix_ops;
@@ -153,6 +155,7 @@ void rpc_destroy_generic_auth(void);
153void rpc_destroy_authunix(void); 155void rpc_destroy_authunix(void);
154 156
155struct rpc_cred * rpc_lookup_cred(void); 157struct rpc_cred * rpc_lookup_cred(void);
158struct rpc_cred * rpc_lookup_cred_nonblock(void);
156struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); 159struct rpc_cred * rpc_lookup_machine_cred(const char *service_name);
157int rpcauth_register(const struct rpc_authops *); 160int rpcauth_register(const struct rpc_authops *);
158int rpcauth_unregister(const struct rpc_authops *); 161int rpcauth_unregister(const struct rpc_authops *);
@@ -182,6 +185,7 @@ void rpcauth_clear_credcache(struct rpc_cred_cache *);
182int rpcauth_key_timeout_notify(struct rpc_auth *, 185int rpcauth_key_timeout_notify(struct rpc_auth *,
183 struct rpc_cred *); 186 struct rpc_cred *);
184bool rpcauth_cred_key_to_expire(struct rpc_cred *); 187bool rpcauth_cred_key_to_expire(struct rpc_cred *);
188char * rpcauth_stringify_acceptor(struct rpc_cred *);
185 189
186static inline 190static inline
187struct rpc_cred * get_rpccred(struct rpc_cred *cred) 191struct rpc_cred * get_rpccred(struct rpc_cred *cred)
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
index f1cfd4c85cd0..36eebc451b41 100644
--- a/include/linux/sunrpc/auth_gss.h
+++ b/include/linux/sunrpc/auth_gss.h
@@ -69,8 +69,9 @@ struct gss_cl_ctx {
69 enum rpc_gss_proc gc_proc; 69 enum rpc_gss_proc gc_proc;
70 u32 gc_seq; 70 u32 gc_seq;
71 spinlock_t gc_seq_lock; 71 spinlock_t gc_seq_lock;
72 struct gss_ctx __rcu *gc_gss_ctx; 72 struct gss_ctx *gc_gss_ctx;
73 struct xdr_netobj gc_wire_ctx; 73 struct xdr_netobj gc_wire_ctx;
74 struct xdr_netobj gc_acceptor;
74 u32 gc_win; 75 u32 gc_win;
75 unsigned long gc_expiry; 76 unsigned long gc_expiry;
76 struct rcu_head gc_rcu; 77 struct rcu_head gc_rcu;
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h
index 5af2931cf58d..df02a4188487 100644
--- a/include/linux/sunrpc/gss_krb5.h
+++ b/include/linux/sunrpc/gss_krb5.h
@@ -81,7 +81,7 @@ struct gss_krb5_enctype {
81 struct xdr_netobj *in, 81 struct xdr_netobj *in,
82 struct xdr_netobj *out); /* complete key generation */ 82 struct xdr_netobj *out); /* complete key generation */
83 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset, 83 u32 (*encrypt_v2) (struct krb5_ctx *kctx, u32 offset,
84 struct xdr_buf *buf, int ec, 84 struct xdr_buf *buf,
85 struct page **pages); /* v2 encryption function */ 85 struct page **pages); /* v2 encryption function */
86 u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset, 86 u32 (*decrypt_v2) (struct krb5_ctx *kctx, u32 offset,
87 struct xdr_buf *buf, u32 *headskip, 87 struct xdr_buf *buf, u32 *headskip,
@@ -310,7 +310,7 @@ gss_krb5_aes_make_key(const struct gss_krb5_enctype *gk5e,
310 310
311u32 311u32
312gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset, 312gss_krb5_aes_encrypt(struct krb5_ctx *kctx, u32 offset,
313 struct xdr_buf *buf, int ec, 313 struct xdr_buf *buf,
314 struct page **pages); 314 struct page **pages);
315 315
316u32 316u32
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h
index c2f04e1ae159..64a0a0a97b23 100644
--- a/include/linux/sunrpc/xprtrdma.h
+++ b/include/linux/sunrpc/xprtrdma.h
@@ -62,8 +62,6 @@
62#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ 62#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */
63 63
64/* memory registration strategies */ 64/* memory registration strategies */
65#define RPCRDMA_PERSISTENT_REGISTRATION (1)
66
67enum rpcrdma_memreg { 65enum rpcrdma_memreg {
68 RPCRDMA_BOUNCEBUFFERS = 0, 66 RPCRDMA_BOUNCEBUFFERS = 0,
69 RPCRDMA_REGISTER, 67 RPCRDMA_REGISTER,