From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: anna.schumaker@netapp.com, trond.myklebust@hammerspace.com
Cc: fstests@vger.kernel.org, Murphy Zhou <xzhou@redhat.com>,
linux-nfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
fengxiaoli0714@gmail.com
Subject: [PATCH] nfs: disable client side deduplication
Date: Fri, 31 May 2019 14:06:05 -0700 [thread overview]
Message-ID: <20190531210605.GA5381@magnolia> (raw)
From: Darrick J. Wong <darrick.wong@oracle.com>
The NFS protocol doesn't support deduplication, so turn it off again.
Fixes: ce96e888fe48e ("Fix nfs4.2 return -EINVAL when do dedupe operation")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/nfs/nfs4file.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index cf42a8b939e3..1915f24bba85 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -187,7 +187,11 @@ static loff_t nfs42_remap_file_range(struct file *src_file, loff_t src_off,
bool same_inode = false;
int ret;
- if (remap_flags & ~(REMAP_FILE_DEDUP | REMAP_FILE_ADVISORY))
+ /* NFS does not support deduplication. */
+ if (remap_flags & REMAP_FILE_DEDUP)
+ return -EOPNOTSUPP;
+
+ if (remap_flags & ~REMAP_FILE_ADVISORY)
return -EINVAL;
/* check alignment w.r.t. clone_blksize */
reply other threads:[~2019-05-31 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190531210605.GA5381@magnolia \
--to=darrick.wong@oracle.com \
--cc=anna.schumaker@netapp.com \
--cc=fengxiaoli0714@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
--cc=xzhou@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).