public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 1/1] nfsd4_copy: Adds the ability to do inter server to server on an export
Date: Thu, 28 Oct 2021 10:48:51 -0400	[thread overview]
Message-ID: <20211028144851.644018-2-steved@redhat.com> (raw)
In-Reply-To: <20211028144851.644018-1-steved@redhat.com>

This adds the 's2sc' export option allowing inter server
to server copies on the destination server.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 fs/nfsd/nfs4proc.c               | 3 ++-
 include/uapi/linux/nfsd/export.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 486c5dba4b65..df3ca5f7f86f 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1654,9 +1654,10 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 	struct nfsd4_copy *copy = &u->copy;
 	__be32 status;
 	struct nfsd4_copy *async_copy = NULL;
+	int s2sc = (cstate->current_fh.fh_export->ex_flags & NFSEXP_S2SC);
 
 	if (!copy->cp_intra) { /* Inter server SSC */
-		if (!inter_copy_offload_enable || copy->cp_synchronous) {
+		if (s2sc == 0 && (!inter_copy_offload_enable || copy->cp_synchronous)) {
 			status = nfserr_notsupp;
 			goto out;
 		}
diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h
index 2124ba904779..53ba8d989689 100644
--- a/include/uapi/linux/nfsd/export.h
+++ b/include/uapi/linux/nfsd/export.h
@@ -53,6 +53,7 @@
  */
 #define	NFSEXP_V4ROOT		0x10000
 #define NFSEXP_PNFS		0x20000
+#define NFSEXP_S2SC		0x40000
 
 /* All flags that we claim to support.  (Note we don't support NOACL.) */
 #define NFSEXP_ALLFLAGS		0x3FEFF
-- 
2.31.1


  reply	other threads:[~2021-10-28 14:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 14:48 [PATCH 0/1] Enable inter server to server copies on a export Steve Dickson
2021-10-28 14:48 ` Steve Dickson [this message]
2021-10-29 13:45 ` J. Bruce Fields
2021-10-29 14:26   ` J. Bruce Fields
2021-10-29 15:24     ` Steve Dickson
2021-10-29 14:56   ` Steve Dickson
2021-10-29 16:40     ` J. Bruce Fields
2021-10-29 17:30       ` Steve Dickson
2021-10-29 19:14         ` J. Bruce Fields
2021-11-01 15:30           ` Steve Dickson
2021-11-01 15:40             ` J. Bruce Fields
2021-11-01 16:55               ` Chuck Lever III
2021-11-01 18:24                 ` Steve Dickson
2021-11-01 18:39                 ` Bruce Fields
2021-11-01 18:44                   ` Chuck Lever III
2021-11-01 19:10                   ` Steve Dickson
2021-11-01 19:26                     ` Bruce Fields
2021-11-01 20:28                       ` Steve Dickson
2021-11-01 19:02               ` Steve Dickson
2021-11-01 19:22                 ` dai.ngo
2021-11-01 19:25                   ` J. Bruce Fields
2021-11-01 20:25                     ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211028144851.644018-2-steved@redhat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox