linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/11] client-side support for "inter" SSC copy
@ 2018-10-26 20:10 Olga Kornievskaia
  2018-10-26 20:10 ` [PATCH v4 01/11] VFS: move cross device copy_file_range() check into filesystems Olga Kornievskaia
                   ` (11 more replies)
  0 siblings, 12 replies; 53+ messages in thread
From: Olga Kornievskaia @ 2018-10-26 20:10 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, viro, smfrench, miklos
  Cc: linux-nfs, linux-fsdevel, linux-cifs, linux-unionfs, linux-man

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() to
represent an open.

Also this particular open is marked (NFS_SVC_SSC_COPY_STATE) so
that if the destination server ever to receive stateid errors on
this stateid, it knows not to initiate state recovery (in case
when source server reboots). The recovery must be done by the
client and a new copy must be initiated. Therefore, in this case
the recovery needs to fail with EIO.

v4:
-- in the VFS patches: 1. removed the accidental text in vfs.txt,
2. removed additions to vfs.txt, and 3. Anna provided help with 
wording the commit message and 4. changed the offset check to
include the boundry just like it was before.
-- removed dprintk from the nfs42_ssc_open
-- changed the cross filesystem check in NFS's copy_file_range

Olga Kornievskaia (11):
  VFS move cross device copy_file_range() check into filesystems
  VFS copy_file_range check validity of input source offset
  NFS NFSD defining nl4_servers structure needed by both
  NFS add COPY_NOTIFY operation
  NFS add ca_source_server<> to COPY
  NFS also send OFFLOAD_CANCEL to source server
  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 replace cross device check in copy_file_range

 Documentation/filesystems/porting |   7 ++
 fs/cifs/cifsfs.c                  |   3 +
 fs/nfs/nfs42.h                    |  15 ++-
 fs/nfs/nfs42proc.c                | 129 ++++++++++++++++++++++---
 fs/nfs/nfs42xdr.c                 | 193 +++++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h                  |  10 ++
 fs/nfs/nfs4client.c               |   2 +-
 fs/nfs/nfs4file.c                 | 125 +++++++++++++++++++++++-
 fs/nfs/nfs4proc.c                 |   6 +-
 fs/nfs/nfs4state.c                |  14 +++
 fs/nfs/nfs4xdr.c                  |   1 +
 fs/overlayfs/file.c               |   3 +
 fs/read_write.c                   |  12 +--
 include/linux/nfs4.h              |  25 +++++
 include/linux/nfs_fs_sb.h         |   1 +
 include/linux/nfs_xdr.h           |  17 ++++
 16 files changed, 538 insertions(+), 25 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH v7 00/11] client-side support for "inter" SSC copy
@ 2018-10-30 20:56 Olga Kornievskaia
  2018-10-30 20:56 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
  0 siblings, 1 reply; 53+ messages in thread
From: Olga Kornievskaia @ 2018-10-30 20:56 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, viro, smfrench, miklos
  Cc: linux-nfs, linux-fsdevel, linux-cifs, linux-unionfs, linux-man

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() to

v7:
--- in VFS patch: remove the support for generic copy_file_range
for all file systems, just allow for individual filesystems to
support cross device copy_file_range. the check for the superblocks
is moved just before the do_splice_direct()
--- modified the man page

Olga Kornievskaia (11):
  VFS: move cross device copy_file_range() check into filesystems
  NFS: validity check for source offset in copy_file_range
  NFS NFSD: defining nl4_servers structure needed by both
  NFS: add COPY_NOTIFY operation
  NFS: add ca_source_server<> to COPY
  NFS: also send OFFLOAD_CANCEL to source server
  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: replace cross device check in copy_file_range

 Documentation/filesystems/porting |   7 ++
 fs/cifs/cifsfs.c                  |   3 +
 fs/nfs/nfs42.h                    |  15 ++-
 fs/nfs/nfs42proc.c                | 129 ++++++++++++++++++++++---
 fs/nfs/nfs42xdr.c                 | 193 +++++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h                  |  10 ++
 fs/nfs/nfs4client.c               |   2 +-
 fs/nfs/nfs4file.c                 | 125 +++++++++++++++++++++++-
 fs/nfs/nfs4proc.c                 |   6 +-
 fs/nfs/nfs4state.c                |  14 +++
 fs/nfs/nfs4xdr.c                  |   1 +
 fs/overlayfs/file.c               |   3 +
 fs/read_write.c                   |  12 ++-
 include/linux/nfs4.h              |  25 +++++
 include/linux/nfs_fs_sb.h         |   1 +
 include/linux/nfs_xdr.h           |  17 ++++
 16 files changed, 539 insertions(+), 24 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH v6 00/12] client-side support for "inter" SSC copy
@ 2018-10-29 19:03 Olga Kornievskaia
  2018-10-29 19:03 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
  0 siblings, 1 reply; 53+ messages in thread
From: Olga Kornievskaia @ 2018-10-29 19:03 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, viro, smfrench, miklos
  Cc: linux-nfs, linux-fsdevel, linux-cifs, linux-unionfs, linux-man

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() to
represent an open.

Also this particular open is marked (NFS_SVC_SSC_COPY_STATE) so
that if the destination server ever to receive stateid errors on
this stateid, it knows not to initiate state recovery (in case
when source server reboots). The recovery must be done by the
client and a new copy must be initiated. Therefore, in this case
the recovery needs to fail with EIO.

v6:
-- in the VFS patches: made suggested changes to first allow cross 
device copy for all filesystem via do_splice, still checking 
superblocks for clone/copy_file_range. in the 2nd patch allow
individual copy_file_range to deal with cross device support.
-- fixes NFS cross file system check as per Matthew comments.

Olga Kornievskaia (12):
  VFS: generic cross-device copy_file_range() support for all
    filesystems
  VFS: move cross device copy_file_range() check into filesystems
  NFS: validity check for source offset in copy_file_range
  NFS NFSD: defining nl4_servers structure needed by both
  NFS: add COPY_NOTIFY operation
  NFS: add ca_source_server<> to COPY
  NFS: also send OFFLOAD_CANCEL to source server
  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: replace cross device check in copy_file_range

 Documentation/filesystems/porting |   7 ++
 fs/cifs/cifsfs.c                  |   3 +
 fs/nfs/nfs42.h                    |  15 ++-
 fs/nfs/nfs42proc.c                | 129 ++++++++++++++++++++++---
 fs/nfs/nfs42xdr.c                 | 193 +++++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h                  |  10 ++
 fs/nfs/nfs4client.c               |   2 +-
 fs/nfs/nfs4file.c                 | 125 +++++++++++++++++++++++-
 fs/nfs/nfs4proc.c                 |   6 +-
 fs/nfs/nfs4state.c                |  14 +++
 fs/nfs/nfs4xdr.c                  |   1 +
 fs/overlayfs/file.c               |   3 +
 fs/read_write.c                   |   9 +-
 include/linux/nfs4.h              |  25 +++++
 include/linux/nfs_fs_sb.h         |   1 +
 include/linux/nfs_xdr.h           |  17 ++++
 16 files changed, 535 insertions(+), 25 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH v3 00/11] client-side support for "inter" SSC copy
@ 2018-10-25 21:51 Olga Kornievskaia
  2018-10-25 21:51 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
  0 siblings, 1 reply; 53+ messages in thread
From: Olga Kornievskaia @ 2018-10-25 21:51 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, viro, smfrench, miklos
  Cc: linux-nfs, linux-fsdevel, linux-cifs, linux-unionfs, linux-man

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() to
represent an open.

Also this particular open is marked (NFS_SVC_SSC_COPY_STATE) so
that if the destination server ever to receive stateid errors on
this stateid, it knows not to initiate state recovery (in case
when source server reboots). The recovery must be done by the
client and a new copy must be initiated. Therefore, in this case
the recovery needs to fail with EIO.

v3:
-- Combine CIFS,OverlayFS,NFS checks with the VFS patch that relaxed
the cross device check.
-- Reordered the patches to first enforce cross sb check in NFS,
relax it in VFS, then add support to the NFS, then add a patch to
NFS to check for the cross fs type instead.
-- fixed kbuild suggestion to change PTR_ERR to PTR_ERR_OR_ZERO

Olga Kornievskaia (11):
  VFS move cross device copy_file_range() check into filesystems
  VFS copy_file_range check validity of input source offset
  NFS NFSD defining nl4_servers structure needed by both
  NFS add COPY_NOTIFY operation
  NFS add ca_source_server<> to COPY
  NFS also send OFFLOAD_CANCEL to source server
  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 replace cross device with cross filesystem check in
    copy_file_range

 Documentation/filesystems/porting |   7 ++
 Documentation/filesystems/vfs.txt |   6 +-
 fs/cifs/cifsfs.c                  |   2 +
 fs/nfs/nfs42.h                    |  15 ++-
 fs/nfs/nfs42proc.c                | 129 ++++++++++++++++++++++---
 fs/nfs/nfs42xdr.c                 | 193 +++++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h                  |  10 ++
 fs/nfs/nfs4client.c               |   2 +-
 fs/nfs/nfs4file.c                 | 122 +++++++++++++++++++++++-
 fs/nfs/nfs4proc.c                 |   6 +-
 fs/nfs/nfs4state.c                |  14 +++
 fs/nfs/nfs4xdr.c                  |   1 +
 fs/overlayfs/file.c               |   3 +
 fs/read_write.c                   |  12 +--
 include/linux/nfs4.h              |  25 +++++
 include/linux/nfs_fs_sb.h         |   1 +
 include/linux/nfs_xdr.h           |  17 ++++
 17 files changed, 539 insertions(+), 26 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 53+ messages in thread
* [PATCH v2 00/13] client-side support for "inter" SSC copy
@ 2018-10-24 19:58 Olga Kornievskaia
  2018-10-24 19:58 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
  0 siblings, 1 reply; 53+ messages in thread
From: Olga Kornievskaia @ 2018-10-24 19:58 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker, viro, smfrench, miklos
  Cc: linux-nfs, linux-fsdevel, linux-cifs, linux-unionfs, linux-man

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() to
represent an open.

Also this particular open is marked (NFS_SVC_SSC_COPY_STATE) so
that if the destination server ever to receive stateid errors on
this stateid, it knows not to initiate state recovery (in case
when source server reboots). The recovery must be done by the
client and a new copy must be initiated. Therefore, in this case
the recovery needs to fail with EIO.

v2:
-- VFS changes are to remove VFS check for same copy_file_range
functions before calling it. Instead add the appropriate checks
to the existing implementors of the copy_file_range.
-- Changed the check for the "intra" vs "inter" based on the
serverowner instead of the IPs and merged it with the 1st caller
patch
-- Addressed Anna's comments to ifdef the nfs42_copy_notify in
nfs42.h to make for proper compiling
-- Removed a leftover dprintk from the nfs42_ssc_open

Olga Kornievskaia (13):
  VFS permit cross device vfs_copy_file_range
  CIFS: add cross-device check for copy_file_range
  OverlayFS: add cross-device check for copy_file_range
  NFS: add cross file system check for copy_file_range
  VFS: Don't copy beyond the end of the file
  NFS NFSD defining nl4_servers structure needed by both
  NFS add COPY_NOTIFY operation
  NFS add ca_source_server<> to COPY
  NFS also send OFFLOAD_CANCEL to source server
  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

 Documentation/filesystems/porting |   7 ++
 Documentation/filesystems/vfs.txt |   6 +-
 fs/cifs/cifsfs.c                  |   2 +
 fs/nfs/nfs42.h                    |  15 ++-
 fs/nfs/nfs42proc.c                | 129 ++++++++++++++++++++++---
 fs/nfs/nfs42xdr.c                 | 193 +++++++++++++++++++++++++++++++++++++-
 fs/nfs/nfs4_fs.h                  |  10 ++
 fs/nfs/nfs4client.c               |   2 +-
 fs/nfs/nfs4file.c                 | 122 +++++++++++++++++++++++-
 fs/nfs/nfs4proc.c                 |   6 +-
 fs/nfs/nfs4state.c                |  14 +++
 fs/nfs/nfs4xdr.c                  |   1 +
 fs/overlayfs/file.c               |   3 +
 fs/read_write.c                   |  12 +--
 include/linux/nfs4.h              |  25 +++++
 include/linux/nfs_fs_sb.h         |   1 +
 include/linux/nfs_xdr.h           |  17 ++++
 17 files changed, 539 insertions(+), 26 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2018-11-01  8:33 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 20:10 [PATCH v4 00/11] client-side support for "inter" SSC copy Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 01/11] VFS: move cross device copy_file_range() check into filesystems Olga Kornievskaia
2018-10-26 21:23   ` Matthew Wilcox
2018-10-26 22:10   ` Steve French
2018-10-27  9:09   ` Dave Chinner
2018-10-29 14:31     ` Olga Kornievskaia
2018-10-27 11:11   ` Jeff Layton
2018-10-26 20:10 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
2018-10-27  9:12   ` Dave Chinner
2018-10-27 13:23     ` Matthew Wilcox
2018-10-28  1:33       ` Dave Chinner
2018-10-28  2:39         ` Matthew Wilcox
2018-10-29 14:25         ` Olga Kornievskaia
2018-10-29 15:52           ` Olga Kornievskaia
2018-10-29 17:49             ` Amir Goldstein
2018-10-26 20:10 ` [PATCH v4 02/11] VFS: copy_file_range check validity of input source offset Olga Kornievskaia
2018-10-26 21:26   ` Matthew Wilcox
2018-10-29 16:09     ` Olga Kornievskaia
2018-10-27  9:27   ` Dave Chinner
2018-10-29 14:41     ` Olga Kornievskaia
2018-10-30  9:03       ` Dave Chinner
2018-10-30 13:40         ` Olga Kornievskaia
2018-10-30 23:40           ` Dave Chinner
2018-10-30 21:10         ` Olga Kornievskaia
2018-10-30 21:12           ` Olga Kornievskaia
2018-10-31  0:14           ` Dave Chinner
2018-10-31 14:51             ` Olga Kornievskaia
2018-10-31 23:33               ` Dave Chinner
2018-10-26 20:10 ` [PATCH v4 03/11] NFS: NFSD defining nl4_servers structure needed by both Olga Kornievskaia
2018-10-27 11:14   ` Jeff Layton
2018-10-29 14:28     ` Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 04/11] NFS: add COPY_NOTIFY operation Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 05/11] NFS: add ca_source_server<> to COPY Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 06/11] NFS: also send OFFLOAD_CANCEL to source server Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 07/11] NFS: inter ssc open Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 08/11] NFS: skip recovery of copy open on dest server Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 09/11] NFS: for "inter" copy treat ESTALE as ENOTSUPP Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 10/11] NFS: COPY handle ERR_OFFLOAD_DENIED Olga Kornievskaia
2018-10-26 20:10 ` [PATCH v4 11/11] NFS: replace cross device check in copy_file_range Olga Kornievskaia
2018-10-26 21:22   ` Matthew Wilcox
2018-10-27 11:08   ` Jeff Layton
2018-10-27 13:26     ` Matthew Wilcox
2018-10-29 14:28       ` Olga Kornievskaia
  -- strict thread matches above, loose matches on Subject: below --
2018-10-30 20:56 [PATCH v7 00/11] client-side support for "inter" SSC copy Olga Kornievskaia
2018-10-30 20:56 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
2018-10-29 19:03 [PATCH v6 00/12] client-side support for "inter" SSC copy Olga Kornievskaia
2018-10-29 19:03 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
2018-10-25 21:51 [PATCH v3 00/11] client-side support for "inter" SSC copy Olga Kornievskaia
2018-10-25 21:51 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
2018-10-24 19:58 [PATCH v2 00/13] client-side support for "inter" SSC copy Olga Kornievskaia
2018-10-24 19:58 ` [PATCH 1/1] man-page: copy_file_range(2) allow for cross-device copies Olga Kornievskaia
2018-10-25  4:28   ` Amir Goldstein
2018-10-25 15:26     ` Olga Kornievskaia
2018-10-25 17:24     ` Matthew Wilcox
2018-10-25 17:47       ` Olga Kornievskaia
2018-10-25 18:08         ` Matthew Wilcox
2018-10-25 18:14           ` 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).