Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7093404rwn; Tue, 13 Sep 2022 13:50:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR67jiv18qpGYK4GQVTvwUOmXo1XiZ27geOyaCzOardImWgGycSBJL5LGomwLBf+blJ2r7UU X-Received: by 2002:a17:902:c410:b0:176:e093:1371 with SMTP id k16-20020a170902c41000b00176e0931371mr33787897plk.67.1663102241179; Tue, 13 Sep 2022 13:50:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663102241; cv=none; d=google.com; s=arc-20160816; b=S5RzibkzFSRBNZuBEgSZeWIxGXCAPKbopU1fC7kPLVJzBLbGubiLwkWCuW+y5x+Jsh 5vrFiLZOi2vyhZdj2KF3VD+mWTal3a9it48IWMdyAue7jdBhS6o0AKvb7YGKgylSLvDB 1rO3iUCc/W5b8Cu1Mb7OPD/q/SgTfkw1gvulNgyDzdu3BTFjkR+XvO8t1Tbn68priA50 fbZWJbz92a23kbS6qIHxrRcSdSc8fCm4QLRkzObGR6AlDG1np/AB0m/ZHDoGBDeZK1MG 6s6msyyjm36H1cUKm5JoahwNuLnMtW/2Q3fPo0WNoOqZVZjQesUGzWIH10pmEZHP/Nrl gGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OxvjgcC56ocmQ9xOUoi1L3LIMOvkpOoEQ/7XWYS7ros=; b=GK/qLKIeXYvn/BKDYoe5pIUBKWhXD8e91xtpMuLFgUIvV3zJBKDIqZk2qxy01B6REE xmh3UmWeiDsJDT0sg0Djrcre+Nah5sKhVUTQ9v36YXUpVNT4f4R+/eozyy2zLtpNsC2X ZnAYvEDaXzAfajGFEwbCQ+LoaVK98EjwagsTb2TMgshSF8rZjQUJOJKzz8Gq9GI9Y7HJ sdsU3qQNoAdYv3LYAAGXAL67i9zRg52cPT8qU1GhXa3aBJkQgjW5ubumgaeTfANs90/c A0HQrsO7+l1WyF6uOGjRVV0ePbdPlDAhBEgPO/rrDPEIG/IjSmlUR+R+i5ER5lgz4HVZ VnLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TobhUUhz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a056a00240400b0053abe946910si10370009pfh.349.2022.09.13.13.50.27; Tue, 13 Sep 2022 13:50:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TobhUUhz; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbiIMUme (ORCPT + 99 others); Tue, 13 Sep 2022 16:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiIMUme (ORCPT ); Tue, 13 Sep 2022 16:42:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBBA038458 for ; Tue, 13 Sep 2022 13:42:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 32CC4B810BF for ; Tue, 13 Sep 2022 20:42:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC61CC433C1 for ; Tue, 13 Sep 2022 20:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663101746; bh=XuonAEU8vxC6jyjIWcpfRObxlg8bXm+Gr2lUbR25o2I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TobhUUhz6B+ELxTnT+Lbl9X2vr7dXhJTAAYS63w6J6KXSk4CHWc/U54lrrrPg6Gdn N5UKvXODhCR63g7/unWyVUhIH/oK+z9HzDeKUy9cqH7tVAz06PSiXJo3DVQiveyPqY eDXLoVmULo0zCCi+N4Yv4+MsJY/xQQ9qwsLcQJidbHLycreauTSA03SFc6WuJoKWz0 8oGCiLlBX+NvTOVPTHF9/8Q8JSYvKllUollCHPGTOpVhzXOmnFHwAfYm95zYgWNffE JDNhtIc2Q+4aoSPdF1Ge7xq2zDhxbkaMGjhkRAYAji7r0luvAh2hUWoBGvmobtD8m0 oEpYy9kzGMroA== Received: by mail-wm1-f47.google.com with SMTP id c2-20020a1c3502000000b003b2973dafb7so14185179wma.2 for ; Tue, 13 Sep 2022 13:42:26 -0700 (PDT) X-Gm-Message-State: ACgBeo0dS3zHCTWuTQDhorjH2vSgdZbE2QVgUN5HZmTHEXp/K7qJUEV9 +ylhp+ngJVuxZpaE/H1KsOOhJT8IjDdW91IKrhk= X-Received: by 2002:a05:600c:3516:b0:3a5:c28a:f01d with SMTP id h22-20020a05600c351600b003a5c28af01dmr764417wmq.165.1663101745438; Tue, 13 Sep 2022 13:42:25 -0700 (PDT) MIME-Version: 1.0 References: <20220913180151.1928363-1-anna@kernel.org> <20220913180151.1928363-2-anna@kernel.org> In-Reply-To: From: Anna Schumaker Date: Tue, 13 Sep 2022 16:42:09 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/2] NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data To: Chuck Lever III Cc: Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Sep 13, 2022 at 4:12 PM Chuck Lever III wrote: > > > > > On Sep 13, 2022, at 11:01 AM, Anna Schumaker wrote: > > > > From: Anna Schumaker > > > > This was discussed with Chuck as part of this patch set. Returning > > nfserr_resource was decided to not be the best error message here, and > > he suggested changing to nfserr_serverfault instead. > > > > Signed-off-by: Anna Schumaker > > --- > > fs/nfsd/nfs4xdr.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > I've applied this one for nfsd for-next. Thanks! > > As I mentioned, 2/2 looks OK, and I'll apply it to my private > tree for testing while we work out why it's a little slower. > > > > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c > > index 1e9690a061ec..01dd73ed5720 100644 > > --- a/fs/nfsd/nfs4xdr.c > > +++ b/fs/nfsd/nfs4xdr.c > > @@ -3994,7 +3994,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, > > } > > if (resp->xdr->buf->page_len && splice_ok) { > > WARN_ON_ONCE(1); > > - return nfserr_resource; > > + return nfserr_serverfault; > > Odd, I couldn't find a definition for nfserr_serverfault when > I asked for this patch last week, but this one-liner seems to > compile correctly. Oh well! I found it in fs/nfsd/nfsd.h with `git grep`: #define nfserr_serverfault cpu_to_be32(NFSERR_SERVERFAULT) Anna > > > > } > > xdr_commit_encode(xdr); > > > > -- > > 2.37.3 > > > > -- > Chuck Lever > > >