From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F583C35280 for ; Wed, 2 Oct 2019 16:34:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68EAA21848 for ; Wed, 2 Oct 2019 16:34:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbfJBQem (ORCPT ); Wed, 2 Oct 2019 12:34:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfJBQel (ORCPT ); Wed, 2 Oct 2019 12:34:41 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53AD83086218; Wed, 2 Oct 2019 16:34:41 +0000 (UTC) Received: from pick.fieldses.org (ovpn-123-200.rdu2.redhat.com [10.10.123.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0715B5D9DC; Wed, 2 Oct 2019 16:34:41 +0000 (UTC) Received: by pick.fieldses.org (Postfix, from userid 2815) id 63407120093; Wed, 2 Oct 2019 12:34:39 -0400 (EDT) Date: Wed, 2 Oct 2019 12:34:39 -0400 From: "J. Bruce Fields" To: Olga Kornievskaia Cc: "J. Bruce Fields" , trond.myklebust@hammerspace.com, Anna Schumaker , linux-nfs Subject: Re: [PATCH v7 13/19] NFSD return nfs4_stid in nfs4_preprocess_stateid_op Message-ID: <20191002163439.GA23349@pick.fieldses.org> References: <20190916211353.18802-1-olga.kornievskaia@gmail.com> <20190916211353.18802-14-olga.kornievskaia@gmail.com> <20191002155220.GA19089@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 02 Oct 2019 16:34:41 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 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. --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.