On Wed, Oct 2, 2019 at 12:34 PM J. Bruce Fields <bfields@xxxxxxxxxx> wrote: > > On Wed, Oct 02, 2019 at 12:12:17PM -0400, Olga Kornievskaia wrote: > > On Wed, Oct 2, 2019 at 11:52 AM J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: > > > > > > On Mon, Sep 16, 2019 at 05:13:47PM -0400, Olga Kornievskaia wrote: > > > > @@ -1026,7 +1026,8 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh) > > > > static __be32 > > > > nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, > > > > stateid_t *src_stateid, struct nfsd_file **src, > > > > - stateid_t *dst_stateid, struct nfsd_file **dst) > > > > + stateid_t *dst_stateid, struct nfsd_file **dst, > > > > + struct nfs4_stid **stid) > > > > { > > > > __be32 status; > > > > > > > ... > > > > @@ -1072,7 +1073,7 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh) > > > > __be32 status; > > > > > > > > status = nfsd4_verify_copy(rqstp, cstate, &clone->cl_src_stateid, &src, > > > > - &clone->cl_dst_stateid, &dst); > > > > + &clone->cl_dst_stateid, &dst, NULL); > > > > if (status) > > > > goto out; > > > > > > > > @@ -1260,7 +1261,7 @@ static int nfsd4_do_async_copy(void *data) > > > > > > > > status = nfsd4_verify_copy(rqstp, cstate, ©->cp_src_stateid, > > > > ©->nf_src, ©->cp_dst_stateid, > > > > - ©->nf_dst); > > > > + ©->nf_dst, NULL); > > > > if (status) > > > > goto out; > > > > > > > > > > So both callers pass NULL for the new stid parameter. Looks like that's > > > still true after the full series of patches, too. > > > > > > > If you look at an earlier chunk it uses it (there is only a single > > user of it: copy notify state) > > You're talking about nfs4_preprocess_stateid_op, the above is > nfsd4_verify_copy. I see. You are right, looks like after reworks the nfsd4_verify_copy doesn't need a stid. Previously both copy stateid and copy_notify stateids were tied to its parents but I've removed the link for the copy stateid a while back. Should I now combine this patch with "NFSD add COPY_NOTIFY operation" because that's the only caller of nfsd4_preprocess_stateid_op that needs the stid. > > --b. > > > @@ -1034,14 +1035,14 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst > > *rqstp, struct svc_fh *fh) > > return nfserr_nofilehandle; > > > > status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, > > - src_stateid, RD_STATE, src); > > + src_stateid, RD_STATE, src, NULL); > > if (status) { > > dprintk("NFSD: %s: couldn't process src stateid!\n", __func__); > > goto out; > > } > > > > status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, > > - dst_stateid, WR_STATE, dst); > > + dst_stateid, WR_STATE, dst, stid); > > if (status) { > > dprintk("NFSD: %s: couldn't process dst stateid!\n", __func__); > > goto out_put_src; > > > > > --b.