mbox series

[v10,00/12] client-side support for "inter" SSC copy

Message ID 20190708192444.12664-1-olga.kornievskaia@gmail.com (mailing list archive)
Headers show
Series client-side support for "inter" SSC copy | expand

Message

Olga Kornievskaia July 8, 2019, 7:24 p.m. UTC
From: Olga Kornievskaia <kolga@netapp.com>

This patch series adds client-side support for doing NFSv4.2 "inter"
copy offload between different NFS servers.

In case of the "inter" SSC copy files reside on different servers and
thus under different superblocks and require that VFS removes the
restriction that src and dst files must be on the same superblock.

NFS's copy_file_range() determines if the copy is "intra" or "inter"
and for "inter" it sends the COPY_NOTIFY to the source server. Then,
it would send of an asynchronous COPY to the destination server. If
an application cancels an in-flight COPY, OFFLOAD_CANCEL is sent to
both of the servers.

This patch series also include necessary client-side additions that
are performed by the destination server. The server needs an NFS
open that represents a source file without doing an actual open.
Two function nfs42_ssc_open/nfs42_ssc_close() are introduced to
accomplish it that make use of the VFS's alloc_file_pseudo().
This patch series depends on removal of the cross-device check which
was done in Amir's VFS generic copy_file_range support.

v10:
--- new patch (#12) is added to toggle sync/async copy and also
fallback to traditional copy for small enough inter server to
server copies
--- moved and modified patch "also send OFFLOAD_CANCEL to source
server" to include sending OFFLOAD_CANCEL when the destination server
returns ENOTSUPP on COPY so we need to clean up state on the source
server

Already presented numbers for performance improvement for large
file transfer but here are times for copying linux kernel tree
(which is mostly small files):
-- regular cp 6m1s (intra)
-- copy offload cp 4m11s (intra)
   -- benefit of using copy offload with small copies using sync copy
-- regular cp 6m9s (inter)
-- copy offload cp 6m3s (inter)
   -- same performance as traditional as for most it fallback to traditional
copy offload


Olga Kornievskaia (12):
  NFS NFSD: defining nl4_servers structure needed by both
  NFS: add COPY_NOTIFY operation
  NFS: add ca_source_server<> to COPY
  NFS: inter ssc open
  NFS: skip recovery of copy open on dest server
  NFS: for "inter" copy treat ESTALE as ENOTSUPP
  NFS: COPY handle ERR_OFFLOAD_DENIED
  NFS: also send OFFLOAD_CANCEL to source server
  NFS handle NFS4ERR_PARTNER_NO_AUTH error
  NFS: handle source server reboot
  NFS based on file size issue sync copy or fallback to  generic copy
    offload
  NFS: replace cross device check in copy_file_range

 fs/nfs/nfs42.h            |  15 ++-
 fs/nfs/nfs42proc.c        | 199 ++++++++++++++++++++++++++++++++------
 fs/nfs/nfs42xdr.c         | 190 +++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h          |  11 +++
 fs/nfs/nfs4client.c       |   2 +-
 fs/nfs/nfs4file.c         | 139 +++++++++++++++++++++++++-
 fs/nfs/nfs4proc.c         |   7 +-
 fs/nfs/nfs4state.c        |  40 +++++++-
 fs/nfs/nfs4xdr.c          |   1 +
 include/linux/nfs4.h      |  25 +++++
 include/linux/nfs_fs.h    |   4 +-
 include/linux/nfs_fs_sb.h |   1 +
 include/linux/nfs_xdr.h   |  17 ++++
 13 files changed, 604 insertions(+), 47 deletions(-)