All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/9] NFSD support for async COPY
@ 2018-07-20 22:19 Olga Kornievskaia
  2018-07-20 22:19 ` [PATCH v10 1/9] NFSD CB_OFFLOAD xdr Olga Kornievskaia
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Olga Kornievskaia @ 2018-07-20 22:19 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

From: Olga Kornievskaia <olga.kornievskaia@gmail.com>

To do asynchronous copies, NFSD creates a new kthread to handle the request.
Upon receiving the COPY, it generates a unique copy stateid (stored in a
global list for keeping track of state for OFFLOAD_STATUS to be queried by),
starts the thread, and replies back to the client. nfsd4_copy arguments that
are allocated on the stack are copies for the kthread.

For the async copy handler, copy is done in the loop for the requested
number of bytes. If an error is encountered and partial copy has happened,
a successful partial copy is returned in the CB_OFFLOAD. vfs_copy_file_range
is called with 4MB chunks for both async and sync, allowing for 4MB
granularity of OFFLOAD_STATUS queiry. Once copy is done, the results are
queued for the callback workqueue and sent via CB_OFFLOAD.

When the server received an OFFLOAD_CANCEL, it will find the kthread running
the copy and will send a SIGPENDING and kthread_stop() and it will interrupt
the ongoing do_splice() and once vfs returns we are choosing not to send
the CB_OFFLOAD back to the client.

When the server receives an OFFLOAD_STATUS, it will find the kthread running
the copy and will locate within the copy state the current number of bytes
copied so far.

v10:
-- removed the module parameter
-- nfsd4_init_copy_res() changed to void
-- freed async_copy in nfsd4_copy() on an error case caught by kbuild

Olga Kornievskaia (9):
  NFSD CB_OFFLOAD xdr
  NFSD OFFLOAD_STATUS xdr
  NFSD OFFLOAD_CANCEL xdr
  NFSD xdr callback stateid in async COPY reply
  NFSD introduce async copy feature
  NFSD create new stateid for async copy
  NFSD handle OFFLOAD_CANCEL op
  NFSD support OFFLOAD_STATUS
  NFSD stop ongoing async copies on client shutdown

 fs/nfsd/netns.h        |   8 ++
 fs/nfsd/nfs4callback.c |  98 +++++++++++++++++
 fs/nfsd/nfs4proc.c     | 293 ++++++++++++++++++++++++++++++++++++++++++++++---
 fs/nfsd/nfs4state.c    |  38 ++++++-
 fs/nfsd/nfs4xdr.c      |  50 +++++++--
 fs/nfsd/nfsctl.c       |   1 +
 fs/nfsd/state.h        |  10 ++
 fs/nfsd/xdr4.h         |  28 +++++
 fs/nfsd/xdr4cb.h       |  10 ++
 9 files changed, 512 insertions(+), 24 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2018-09-05 20:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 22:19 [PATCH v10 0/9] NFSD support for async COPY Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 1/9] NFSD CB_OFFLOAD xdr Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 2/9] NFSD OFFLOAD_STATUS xdr Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 3/9] NFSD OFFLOAD_CANCEL xdr Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 4/9] NFSD xdr callback stateid in async COPY reply Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 5/9] NFSD introduce async copy feature Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 6/9] NFSD create new stateid for async copy Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 7/9] NFSD handle OFFLOAD_CANCEL op Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 8/9] NFSD support OFFLOAD_STATUS Olga Kornievskaia
2018-07-20 22:19 ` [PATCH v10 9/9] NFSD stop ongoing async copies on client shutdown Olga Kornievskaia
2018-08-09 20:34 ` [PATCH v10 0/9] NFSD support for async COPY J. Bruce Fields
2018-08-23  1:47   ` J. Bruce Fields
2018-08-23 12:22     ` J. Bruce Fields
2018-08-23 12:32       ` J. Bruce Fields
2018-08-23 18:30         ` Olga Kornievskaia
2018-09-05 14:30     ` Olga Kornievskaia
2018-09-05 15:56       ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.