linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/23] NFS support for async intra COPY
@ 2017-10-13 20:55 Olga Kornievskaia
  2017-10-13 20:55 ` [PATCH v5 01/23] fs: Don't copy beyond the end of the file Olga Kornievskaia
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: Olga Kornievskaia @ 2017-10-13 20:55 UTC (permalink / raw)
  To: Trond.Myklebust, anna.schumaker; +Cc: linux-nfs

Change the client side to always request an asynchronous copy.

If server replies to the COPY with the copy stateid, client will go
wait on the CB_OFFLOAD. To fend off the race between CB_OFFLOAD and
COPY reply, we check the list of pending callbacks before going to
wait. Client adds the copy to the global list of copy stateids for the
callback to look thru and signal the waiting copy.

When the client receives reply from the CB_OFFLOAD with some bytes and
committed how is UNSTABLE, then COMMIT is sent to the server. The results
arep propagated to the VFS and application. Assuming that application
will deal with a partial result and continue from the new offset if needed.

If server errs with ERR_OFFLOAD_NOREQS the copy will be re-sent as a
synchronous COPY. If application cancels an in-flight COPY,
OFFLOAD_CANCEL is sent to the server (sending it as an async RPC in the
context of the nfsid_workqueue).

v5:
1. fixed status wasn't initialized GCC complained.
2. fixed comment typo and moved initialization of status from one patch
to another
3. moved the handling of the commit after copy into its own function
and when verifier verification fails, returning EAGAIN so the whole
copy is retried again.
 
Anna Schumaker (1):
  fs: Don't copy beyond the end of the file

Olga Kornievskaia (11):
  NFS CB_OFFLOAD xdr
  NFS OFFLOAD_STATUS xdr
  NFS OFFLOAD_STATUS op
  NFS OFFLOAD_CANCEL xdr
  NFS COPY xdr handle async reply
  NFS add support for asynchronous COPY
  NFS handle COPY reply CB_OFFLOAD call race
  NFS export nfs4_async_handle_error
  NFS send OFFLOAD_CANCEL when COPY killed
  NFS handle COPY ERR_OFFLOAD_NO_REQS
  NFS add a simple sync nfs4_proc_commit after async COPY

 Documentation/filesystems/vfs.txt |   6 +
 fs/nfs/callback.h                 |  12 ++
 fs/nfs/callback_proc.c            |  54 ++++++
 fs/nfs/callback_xdr.c             |  81 +++++++-
 fs/nfs/client.c                   |   1 +
 fs/nfs/nfs42.h                    |  17 +-
 fs/nfs/nfs42proc.c                | 378 +++++++++++++++++++++++++++++++++++--
 fs/nfs/nfs42xdr.c                 | 380 ++++++++++++++++++++++++++++++++++++--
 fs/nfs/nfs4_fs.h                  |  18 +-
 fs/nfs/nfs4client.c               |  15 ++
 fs/nfs/nfs4file.c                 | 135 +++++++++++++-
 fs/nfs/nfs4proc.c                 |  44 ++++-
 fs/nfs/nfs4state.c                |  31 +++-
 fs/nfs/nfs4xdr.c                  |   3 +
 fs/read_write.c                   |  16 +-
 include/linux/nfs4.h              |  27 +++
 include/linux/nfs_fs.h            |  11 ++
 include/linux/nfs_fs_sb.h         |   5 +
 include/linux/nfs_xdr.h           |  31 ++++
 19 files changed, 1219 insertions(+), 46 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-10-18 17:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 20:55 [PATCH v5 00/23] NFS support for async intra COPY Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 01/23] fs: Don't copy beyond the end of the file Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 02/23] NFS CB_OFFLOAD xdr Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 03/23] NFS OFFLOAD_STATUS xdr Olga Kornievskaia
2017-10-17 18:39   ` Anna Schumaker
2017-10-18 17:20     ` Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 04/23] NFS OFFLOAD_STATUS op Olga Kornievskaia
2017-10-13 20:57   ` Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 05/23] NFS OFFLOAD_CANCEL xdr Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 06/23] NFS COPY xdr handle async reply Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 07/23] NFS add support for asynchronous COPY Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 08/23] NFS handle COPY reply CB_OFFLOAD call race Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 09/23] NFS export nfs4_async_handle_error Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 10/23] NFS send OFFLOAD_CANCEL when COPY killed Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 11/23] NFS handle COPY ERR_OFFLOAD_NO_REQS Olga Kornievskaia
2017-10-13 20:55 ` [PATCH v5 12/23] NFS add a simple sync nfs4_proc_commit after async COPY Olga Kornievskaia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).