From: bfields@fieldses.org (J. Bruce Fields)
To: Olga Kornievskaia <kolga@netapp.com>
Cc: bfields@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v7 05/10] NFSD introduce asynch copy feature
Date: Wed, 7 Mar 2018 15:38:34 -0500 [thread overview]
Message-ID: <20180307203834.GB28844@fieldses.org> (raw)
In-Reply-To: <20180220164229.65404-6-kolga@netapp.com>
On Tue, Feb 20, 2018 at 11:42:24AM -0500, Olga Kornievskaia wrote:
> +static int nfsd4_init_copy_res(struct nfsd4_copy *copy, bool sync)
> +{
> + memcpy(©->cp_res.cb_stateid, ©->cp_dst_stateid,
> + sizeof(copy->cp_dst_stateid));
> + copy->cp_res.wr_stable_how = NFS_UNSTABLE;
> + copy->cp_consecutive = 1;
The cp_consecutive field was there before you came along, but I don't
really see the point of it; all we do is ignore it and always set it to
one. I'd just hard-code it into the xdr code:
commit f0a45f80333e
Author: J. Bruce Fields <bfields@redhat.com>
Date: Wed Mar 7 15:37:35 2018 -0500
nfsd: remove unsused "cp_consecutive" field
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index a0bed2b2004d..40dfb759d38d 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1106,7 +1106,6 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
else {
copy->cp_res.wr_bytes_written = bytes;
copy->cp_res.wr_stable_how = NFS_UNSTABLE;
- copy->cp_consecutive = 1;
copy->cp_synchronous = 1;
gen_boot_verifier(©->cp_res.wr_verifier, SVC_NET(rqstp));
status = nfs_ok;
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index e502fd16246b..9f8ef2c6e508 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1759,7 +1759,7 @@ nfsd4_decode_copy(struct nfsd4_compoundargs *argp, struct nfsd4_copy *copy)
p = xdr_decode_hyper(p, ©->cp_src_pos);
p = xdr_decode_hyper(p, ©->cp_dst_pos);
p = xdr_decode_hyper(p, ©->cp_count);
- copy->cp_consecutive = be32_to_cpup(p++);
+ p++; /* ca_consecutive: we always do consecutive copies */
copy->cp_synchronous = be32_to_cpup(p++);
tmp = be32_to_cpup(p); /* Source server list not supported */
@@ -4214,7 +4214,7 @@ nfsd4_encode_copy(struct nfsd4_compoundres *resp, __be32 nfserr,
return nfserr;
p = xdr_reserve_space(&resp->xdr, 4 + 4);
- *p++ = cpu_to_be32(copy->cp_consecutive);
+ *p++ = xdr_one; /* cr_consecutive */
*p++ = cpu_to_be32(copy->cp_synchronous);
return 0;
}
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index bc29511b6405..7cbc129092fe 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -518,7 +518,6 @@ struct nfsd4_copy {
u64 cp_count;
/* both */
- bool cp_consecutive;
bool cp_synchronous;
/* response */
next prev parent reply other threads:[~2018-03-07 20:38 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 16:42 [PATCH v7 00/10] NFSD support for asynchronous COPY Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 01/10] NFSD CB_OFFLOAD xdr Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 02/10] NFSD OFFLOAD_STATUS xdr Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 03/10] NFSD OFFLOAD_CANCEL xdr Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 04/10] NFSD xdr callback stateid in async COPY reply Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 05/10] NFSD introduce asynch copy feature Olga Kornievskaia
2018-03-06 21:27 ` J. Bruce Fields
2018-03-07 20:48 ` Olga Kornievskaia
2018-03-07 20:38 ` J. Bruce Fields [this message]
2018-03-07 20:50 ` Olga Kornievskaia
2018-03-07 21:05 ` J. Bruce Fields
2018-03-07 22:06 ` Olga Kornievskaia
2018-03-08 15:07 ` J. Bruce Fields
2018-03-22 15:08 ` Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 06/10] NFSD return nfs4_stid in nfs4_preprocess_stateid_op Olga Kornievskaia
2018-03-07 21:43 ` J. Bruce Fields
2018-03-07 21:54 ` Olga Kornievskaia
2018-03-08 15:14 ` J. Bruce Fields
2018-02-20 16:42 ` [PATCH v7 07/10] NFSD create new stateid for async copy Olga Kornievskaia
2018-03-08 16:31 ` J. Bruce Fields
2018-03-22 15:12 ` Olga Kornievskaia
2018-03-22 15:17 ` J. Bruce Fields
2018-03-22 16:40 ` Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 08/10] NFSD handle OFFLOAD_CANCEL op Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 09/10] NFSD support OFFLOAD_STATUS Olga Kornievskaia
2018-02-20 16:42 ` [PATCH v7 10/10] NFSD stop queued async copies on client shutdown Olga Kornievskaia
2018-03-08 17:05 ` J. Bruce Fields
2018-04-10 20:09 ` Olga Kornievskaia
2018-04-10 20:21 ` J. Bruce Fields
2018-04-10 21:07 ` Olga Kornievskaia
2018-04-10 21:13 ` J. Bruce Fields
2018-04-11 17:33 ` J. Bruce Fields
2018-04-12 20:05 ` Olga Kornievskaia
2018-04-12 20:06 ` J. Bruce Fields
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=20180307203834.GB28844@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=kolga@netapp.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 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.