diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-26 13:33:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-26 13:33:33 -0400 |
| commit | ea8ea737c46cffa5d0ee74309f81e55a7e5e9c2a (patch) | |
| tree | ae159b2c5968fa3c2a5a4ab7176584bc9a17b889 /include/linux/sunrpc | |
| parent | 0b9210c9c86e46a7a62bbc7b69b84001315072ff (diff) | |
| parent | c7d73af2d249f0323f5cdb171a59497ce80011fb (diff) | |
Merge tag 'nfs-for-4.7-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client updates from Anna Schumaker:
"Highlights include:
Features:
- Add support for the NFS v4.2 COPY operation
- Add support for NFS/RDMA over IPv6
Bugfixes and cleanups:
- Avoid race that crashes nfs_init_commit()
- Fix oops in callback path
- Fix LOCK/OPEN race when unlinking an open file
- Choose correct stateids when using delegations in setattr, read and
write
- Don't send empty SETATTR after OPEN_CREATE
- xprtrdma: Prevent server from writing a reply into memory client
has released
- xprtrdma: Support using Read list and Reply chunk in one RPC call"
* tag 'nfs-for-4.7-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (61 commits)
pnfs: pnfs_update_layout needs to consider if strict iomode checking is on
nfs/flexfiles: Use the layout segment for reading unless it a IOMODE_RW and reading is disabled
nfs/flexfiles: Helper function to detect FF_FLAGS_NO_READ_IO
nfs: avoid race that crashes nfs_init_commit
NFS: checking for NULL instead of IS_ERR() in nfs_commit_file()
pnfs: make pnfs_layout_process more robust
pnfs: rework LAYOUTGET retry handling
pnfs: lift retry logic from send_layoutget to pnfs_update_layout
pnfs: fix bad error handling in send_layoutget
flexfiles: add kerneldoc header to nfs4_ff_layout_prepare_ds
flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED
pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args
pnfs: keep track of the return sequence number in pnfs_layout_hdr
pnfs: record sequence in pnfs_layout_segment when it's created
pnfs: don't merge new ff lsegs with ones that have LAYOUTRETURN bit set
pNFS/flexfiles: When initing reads or writes, we might have to retry connecting to DSes
pNFS/flexfiles: When checking for available DSes, conditionally check for MDS io
pNFS/flexfile: Fix erroneous fall back to read/write through the MDS
NFS: Reclaim writes via writepage are opportunistic
NFSv4: Use the right stateid for delegations in setattr, read and write
...
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/auth.h | 26 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/msg_prot.h | 4 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprtrdma.h | 4 |
5 files changed, 30 insertions, 6 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 6a241a277249..899791573a40 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -127,7 +127,7 @@ struct rpc_authops { | |||
| 127 | void (*destroy)(struct rpc_auth *); | 127 | void (*destroy)(struct rpc_auth *); |
| 128 | 128 | ||
| 129 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); | 129 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); |
| 130 | struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int); | 130 | struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int, gfp_t); |
| 131 | int (*list_pseudoflavors)(rpc_authflavor_t *, int); | 131 | int (*list_pseudoflavors)(rpc_authflavor_t *, int); |
| 132 | rpc_authflavor_t (*info2flavor)(struct rpcsec_gss_info *); | 132 | rpc_authflavor_t (*info2flavor)(struct rpcsec_gss_info *); |
| 133 | int (*flavor2info)(rpc_authflavor_t, | 133 | int (*flavor2info)(rpc_authflavor_t, |
| @@ -167,6 +167,7 @@ void rpc_destroy_authunix(void); | |||
| 167 | 167 | ||
| 168 | struct rpc_cred * rpc_lookup_cred(void); | 168 | struct rpc_cred * rpc_lookup_cred(void); |
| 169 | struct rpc_cred * rpc_lookup_cred_nonblock(void); | 169 | struct rpc_cred * rpc_lookup_cred_nonblock(void); |
| 170 | struct rpc_cred * rpc_lookup_generic_cred(struct auth_cred *, int, gfp_t); | ||
| 170 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); | 171 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); |
| 171 | int rpcauth_register(const struct rpc_authops *); | 172 | int rpcauth_register(const struct rpc_authops *); |
| 172 | int rpcauth_unregister(const struct rpc_authops *); | 173 | int rpcauth_unregister(const struct rpc_authops *); |
| @@ -178,7 +179,7 @@ rpc_authflavor_t rpcauth_get_pseudoflavor(rpc_authflavor_t, | |||
| 178 | int rpcauth_get_gssinfo(rpc_authflavor_t, | 179 | int rpcauth_get_gssinfo(rpc_authflavor_t, |
| 179 | struct rpcsec_gss_info *); | 180 | struct rpcsec_gss_info *); |
| 180 | int rpcauth_list_flavors(rpc_authflavor_t *, int); | 181 | int rpcauth_list_flavors(rpc_authflavor_t *, int); |
| 181 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 182 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int, gfp_t); |
| 182 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); | 183 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); |
| 183 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); | 184 | struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); |
| 184 | struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int); | 185 | struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int); |
| @@ -201,9 +202,28 @@ char * rpcauth_stringify_acceptor(struct rpc_cred *); | |||
| 201 | static inline | 202 | static inline |
| 202 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) | 203 | struct rpc_cred * get_rpccred(struct rpc_cred *cred) |
| 203 | { | 204 | { |
| 204 | atomic_inc(&cred->cr_count); | 205 | if (cred != NULL) |
| 206 | atomic_inc(&cred->cr_count); | ||
| 205 | return cred; | 207 | return cred; |
| 206 | } | 208 | } |
| 207 | 209 | ||
| 210 | /** | ||
| 211 | * get_rpccred_rcu - get a reference to a cred using rcu-protected pointer | ||
| 212 | * @cred: cred of which to take a reference | ||
| 213 | * | ||
| 214 | * In some cases, we may have a pointer to a credential to which we | ||
| 215 | * want to take a reference, but don't already have one. Because these | ||
| 216 | * objects are freed using RCU, we can access the cr_count while its | ||
| 217 | * on its way to destruction and only take a reference if it's not already | ||
| 218 | * zero. | ||
| 219 | */ | ||
| 220 | static inline struct rpc_cred * | ||
| 221 | get_rpccred_rcu(struct rpc_cred *cred) | ||
| 222 | { | ||
| 223 | if (atomic_inc_not_zero(&cred->cr_count)) | ||
| 224 | return cred; | ||
| 225 | return NULL; | ||
| 226 | } | ||
| 227 | |||
| 208 | #endif /* __KERNEL__ */ | 228 | #endif /* __KERNEL__ */ |
| 209 | #endif /* _LINUX_SUNRPC_AUTH_H */ | 229 | #endif /* _LINUX_SUNRPC_AUTH_H */ |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 9a7ddbaf116e..19c659d1c0f8 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -176,6 +176,7 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | |||
| 176 | int rpc_protocol(struct rpc_clnt *); | 176 | int rpc_protocol(struct rpc_clnt *); |
| 177 | struct net * rpc_net_ns(struct rpc_clnt *); | 177 | struct net * rpc_net_ns(struct rpc_clnt *); |
| 178 | size_t rpc_max_payload(struct rpc_clnt *); | 178 | size_t rpc_max_payload(struct rpc_clnt *); |
| 179 | size_t rpc_max_bc_payload(struct rpc_clnt *); | ||
| 179 | unsigned long rpc_get_timeout(struct rpc_clnt *clnt); | 180 | unsigned long rpc_get_timeout(struct rpc_clnt *clnt); |
| 180 | void rpc_force_rebind(struct rpc_clnt *); | 181 | void rpc_force_rebind(struct rpc_clnt *); |
| 181 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 182 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h index 807371357160..59cbf16eaeb5 100644 --- a/include/linux/sunrpc/msg_prot.h +++ b/include/linux/sunrpc/msg_prot.h | |||
| @@ -158,9 +158,9 @@ typedef __be32 rpc_fraghdr; | |||
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| 160 | * Note that RFC 1833 does not put any size restrictions on the | 160 | * Note that RFC 1833 does not put any size restrictions on the |
| 161 | * netid string, but all currently defined netid's fit in 4 bytes. | 161 | * netid string, but all currently defined netid's fit in 5 bytes. |
| 162 | */ | 162 | */ |
| 163 | #define RPCBIND_MAXNETIDLEN (4u) | 163 | #define RPCBIND_MAXNETIDLEN (5u) |
| 164 | 164 | ||
| 165 | /* | 165 | /* |
| 166 | * Universal addresses are introduced in RFC 1833 and further spelled | 166 | * Universal addresses are introduced in RFC 1833 and further spelled |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index fb0d212e0d3a..5aa3834619a8 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -142,6 +142,7 @@ struct rpc_xprt_ops { | |||
| 142 | int (*bc_setup)(struct rpc_xprt *xprt, | 142 | int (*bc_setup)(struct rpc_xprt *xprt, |
| 143 | unsigned int min_reqs); | 143 | unsigned int min_reqs); |
| 144 | int (*bc_up)(struct svc_serv *serv, struct net *net); | 144 | int (*bc_up)(struct svc_serv *serv, struct net *net); |
| 145 | size_t (*bc_maxpayload)(struct rpc_xprt *xprt); | ||
| 145 | void (*bc_free_rqst)(struct rpc_rqst *rqst); | 146 | void (*bc_free_rqst)(struct rpc_rqst *rqst); |
| 146 | void (*bc_destroy)(struct rpc_xprt *xprt, | 147 | void (*bc_destroy)(struct rpc_xprt *xprt, |
| 147 | unsigned int max_reqs); | 148 | unsigned int max_reqs); |
diff --git a/include/linux/sunrpc/xprtrdma.h b/include/linux/sunrpc/xprtrdma.h index 767190b01363..39267dc3486a 100644 --- a/include/linux/sunrpc/xprtrdma.h +++ b/include/linux/sunrpc/xprtrdma.h | |||
| @@ -52,7 +52,9 @@ | |||
| 52 | #define RPCRDMA_DEF_SLOT_TABLE (128U) | 52 | #define RPCRDMA_DEF_SLOT_TABLE (128U) |
| 53 | #define RPCRDMA_MAX_SLOT_TABLE (256U) | 53 | #define RPCRDMA_MAX_SLOT_TABLE (256U) |
| 54 | 54 | ||
| 55 | #define RPCRDMA_DEF_INLINE (1024) /* default inline max */ | 55 | #define RPCRDMA_MIN_INLINE (1024) /* min inline thresh */ |
| 56 | #define RPCRDMA_DEF_INLINE (1024) /* default inline thresh */ | ||
| 57 | #define RPCRDMA_MAX_INLINE (3068) /* max inline thresh */ | ||
| 56 | 58 | ||
| 57 | /* Memory registration strategies, by number. | 59 | /* Memory registration strategies, by number. |
| 58 | * This is part of a kernel / user space API. Do not remove. */ | 60 | * This is part of a kernel / user space API. Do not remove. */ |
