diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-23 19:03:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-23 19:03:58 -0400 |
commit | 53a01c9a5fcf74b7f855e70dd69742fb3cb84c83 (patch) | |
tree | 1de69b563fc0e5e7b852acfc33abda61fc7671ed /fs/nfs/nfs4client.c | |
parent | 9157141c95bc3ffcdae93fde5d5aafee7ce6e39a (diff) | |
parent | 0af4c8be97a14d1df8a78b4993a09e8dff545a18 (diff) |
Merge tag 'nfs-for-4.19-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client updates from Anna Schumaker:
"These patches include adding async support for the v4.2 COPY
operation. I think Bruce is planning to send the server patches for
the next release, but I figured we could get the client side out of
the way now since it's been in my tree for a while. This shouldn't
cause any problems, since the server will still respond with
synchronous copies even if the client requests async.
Features:
- Add support for asynchronous server-side COPY operations
Stable bufixes:
- Fix an off-by-one in bl_map_stripe() (v3.17+)
- NFSv4 client live hangs after live data migration recovery (v4.9+)
- xprtrdma: Fix disconnect regression (v4.18+)
- Fix locking in pnfs_generic_recover_commit_reqs (v4.14+)
- Fix a sleep in atomic context in nfs4_callback_sequence() (v4.9+)
Other bugfixes and cleanups:
- Optimizations and fixes involving NFS v4.1 / pNFS layout handling
- Optimize lseek(fd, SEEK_CUR, 0) on directories to avoid locking
- Immediately reschedule writeback when the server replies with an
error
- Fix excessive attribute revalidation in nfs_execute_ok()
- Add error checking to nfs_idmap_prepare_message()
- Use new vm_fault_t return type
- Return a delegation when reclaiming one that the server has
recalled
- Referrals should inherit proto setting from parents
- Make rpc_auth_create_args a const
- Improvements to rpc_iostats tracking
- Fix a potential reference leak when there is an error processing a
callback
- Fix rmdir / mkdir / rename nlink accounting
- Fix updating inode change attribute
- Fix error handling in nfsn4_sp4_select_mode()
- Use an appropriate work queue for direct-write completion
- Don't busy wait if NFSv4 session draining is interrupted"
* tag 'nfs-for-4.19-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (54 commits)
pNFS: Remove unwanted optimisation of layoutget
pNFS/flexfiles: ff_layout_pg_init_read should exit on error
pNFS: Treat RECALLCONFLICT like DELAY...
pNFS: When updating the stateid in layoutreturn, also update the recall range
NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
NFSv4: Fix a typo in nfs4_init_channel_attrs()
NFSv4: Don't busy wait if NFSv4 session draining is interrupted
NFS recover from destination server reboot for copies
NFS add a simple sync nfs4_proc_commit after async COPY
NFS handle COPY ERR_OFFLOAD_NO_REQS
NFS send OFFLOAD_CANCEL when COPY killed
NFS export nfs4_async_handle_error
NFS handle COPY reply CB_OFFLOAD call race
NFS add support for asynchronous COPY
NFS COPY xdr handle async reply
NFS OFFLOAD_CANCEL xdr
NFS CB_OFFLOAD xdr
NFS: Use an appropriate work queue for direct-write completion
NFSv4: Fix error handling in nfs4_sp4_select_mode()
...
Diffstat (limited to 'fs/nfs/nfs4client.c')
-rw-r--r-- | fs/nfs/nfs4client.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 979631411a0e..146e30862234 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c | |||
@@ -156,9 +156,23 @@ nfs4_shutdown_ds_clients(struct nfs_client *clp) | |||
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
159 | static void | ||
160 | nfs4_cleanup_callback(struct nfs_client *clp) | ||
161 | { | ||
162 | struct nfs4_copy_state *cp_state; | ||
163 | |||
164 | while (!list_empty(&clp->pending_cb_stateids)) { | ||
165 | cp_state = list_entry(clp->pending_cb_stateids.next, | ||
166 | struct nfs4_copy_state, copies); | ||
167 | list_del(&cp_state->copies); | ||
168 | kfree(cp_state); | ||
169 | } | ||
170 | } | ||
171 | |||
159 | void nfs41_shutdown_client(struct nfs_client *clp) | 172 | void nfs41_shutdown_client(struct nfs_client *clp) |
160 | { | 173 | { |
161 | if (nfs4_has_session(clp)) { | 174 | if (nfs4_has_session(clp)) { |
175 | nfs4_cleanup_callback(clp); | ||
162 | nfs4_shutdown_ds_clients(clp); | 176 | nfs4_shutdown_ds_clients(clp); |
163 | nfs4_destroy_session(clp->cl_session); | 177 | nfs4_destroy_session(clp->cl_session); |
164 | nfs4_destroy_clientid(clp); | 178 | nfs4_destroy_clientid(clp); |
@@ -202,6 +216,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) | |||
202 | #if IS_ENABLED(CONFIG_NFS_V4_1) | 216 | #if IS_ENABLED(CONFIG_NFS_V4_1) |
203 | init_waitqueue_head(&clp->cl_lock_waitq); | 217 | init_waitqueue_head(&clp->cl_lock_waitq); |
204 | #endif | 218 | #endif |
219 | INIT_LIST_HEAD(&clp->pending_cb_stateids); | ||
205 | return clp; | 220 | return clp; |
206 | 221 | ||
207 | error: | 222 | error: |
@@ -1127,7 +1142,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1127 | nfs_server_copy_userdata(server, parent_server); | 1142 | nfs_server_copy_userdata(server, parent_server); |
1128 | 1143 | ||
1129 | /* Get a client representation */ | 1144 | /* Get a client representation */ |
1130 | #ifdef CONFIG_SUNRPC_XPRT_RDMA | 1145 | #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) |
1131 | rpc_set_port(data->addr, NFS_RDMA_PORT); | 1146 | rpc_set_port(data->addr, NFS_RDMA_PORT); |
1132 | error = nfs4_set_client(server, data->hostname, | 1147 | error = nfs4_set_client(server, data->hostname, |
1133 | data->addr, | 1148 | data->addr, |
@@ -1139,7 +1154,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1139 | parent_client->cl_net); | 1154 | parent_client->cl_net); |
1140 | if (!error) | 1155 | if (!error) |
1141 | goto init_server; | 1156 | goto init_server; |
1142 | #endif /* CONFIG_SUNRPC_XPRT_RDMA */ | 1157 | #endif /* IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) */ |
1143 | 1158 | ||
1144 | rpc_set_port(data->addr, NFS_PORT); | 1159 | rpc_set_port(data->addr, NFS_PORT); |
1145 | error = nfs4_set_client(server, data->hostname, | 1160 | error = nfs4_set_client(server, data->hostname, |
@@ -1153,7 +1168,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, | |||
1153 | if (error < 0) | 1168 | if (error < 0) |
1154 | goto error; | 1169 | goto error; |
1155 | 1170 | ||
1156 | #ifdef CONFIG_SUNRPC_XPRT_RDMA | 1171 | #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) |
1157 | init_server: | 1172 | init_server: |
1158 | #endif | 1173 | #endif |
1159 | error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); | 1174 | error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); |