Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp210250lqf; Fri, 26 Apr 2024 04:43:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1IK3dSd/zPVSTn9JMH6gQduLHdIFswHXvxICZFL4FZeKDoC+RcZRQQZ/KgslliT4teLeZETwOsfxy9XATu85gsBdiAzytxercGe0XLQ== X-Google-Smtp-Source: AGHT+IHUCjVIjCclHR0oOu9BhQWxkUtj5XILGdIjt+L6V8f+dFpZ3Enl4DR8wx+nKIbxcrv9LxZx X-Received: by 2002:a05:620a:4110:b0:790:a9b1:aea3 with SMTP id j16-20020a05620a411000b00790a9b1aea3mr2374840qko.49.1714131836497; Fri, 26 Apr 2024 04:43:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714131836; cv=pass; d=google.com; s=arc-20160816; b=VDh2NA5xprYwYzdtxAPme7+Dl1qb7StkjoM1divQBVDDvqaRdbd9LbPMiNOgTsCPz5 tAX/xDPkoooP8XZNW3Y272yWGdVVjEvHv9rGAlyFB1/LDk4BPb7BOUpxJE5HM0kwyO6G mdgIYB/EznMT/9+uSs3c2W50d8lKCHIUhxZ59nEphGsZYgxi0xqddxowuQNV2n8IYf9j 2LQZlf1BO5mK49eVDFfumEFRr9wyVpo7hFumz8ZkVEDLvcD/X2wJMeWZPNQwu/6Qq/MT Dz//KMSXGf/0kTxfI4rkBHBCRvX2K1KnB8UmXxCgjRwM0vboo0TibJ/Eth39udNNemC+ 46MA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YVvLB09Cs7IPrmkvMKRrrRshC6c4zW2lowSAmuaLeDw=; fh=CAtAmFVtstJYB2TV0r0nRY2hAdhiz/KvVephFfjSjBo=; b=sCo8iM0fk0Dd97DZP1091WBQXHs95ABLMF4wvVHQcUvTtOAYf91pkAc7jtaUg8NaI8 P46Jss7XpTIYloWz60VtVICkK3tmkRTZpQ4w6Fm73Y5Bj/Ka0guoICa0Hacluf3P7Pxj BYVAVd5PV8C1CkiLg4UTajBBZQWpZmbonl/jln5Ij3q6/aa6xU7tZoOr/5TgDg9kap4v Ho1wIxP/f76INy3oWGTt137o10h4IUIYpcquTb8HnXFWmlx0ZmyQGkaGfUtyiSZiVzFZ r01ZTn7uZCM5D270AHLZ193Oq8IDa9XYqJ/4JrxJI/vvLf2vn6T3kTlpx9Euv8/TCvFS jkrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GJZoeAvl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pi9-20020a05620a378900b0078d6b75004esi19032232qkn.271.2024.04.26.04.43.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 04:43:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GJZoeAvl; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-3032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7CED21C2180D for ; Fri, 26 Apr 2024 11:43:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F5F4145343; Fri, 26 Apr 2024 11:43:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GJZoeAvl" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14F803A1B7 for ; Fri, 26 Apr 2024 11:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714131815; cv=none; b=TYHW/AF0gc4mt19A1gjOVvFMbCYoKvLSgek7+gJ1O8sydK9kQSginyc2Svi+hdVK9Gtwj4mJTuSnXwA4UlKJzZBwlF+9f+zSAeEDqkwnEA2FGTwObwOgNt2Weytk2WId07n45rE7TZ/YV4s468xLnF0t1weTIjAvXJbJ7/+nj2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714131815; c=relaxed/simple; bh=jUxyDem5Qj3LChUa1ZvqwtfbndDhZqPuD+yptfe/+D0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CVQ6VApOA0OOGOXPWrfXDzsjiMQ4piBoTJmXW1K57dD+8Ss1HIYAYYKj1ioaQ4qdmSNOEhlgh55HmQDyJ8dhqQbb9olj43x4zQv07cGHQ6jqVMytN24CS7K8hMbd+zxrzVj5nHwPh9Ke86OHIcjtTPObQwT5VVuWrRpofANDVYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GJZoeAvl; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714131812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YVvLB09Cs7IPrmkvMKRrrRshC6c4zW2lowSAmuaLeDw=; b=GJZoeAvlMl9Shfbcm3j9X3abxyirINDT13Ke7D5WGOksSmjiLt8vkc4bfkusTRNV+L0n5H WF/jb8CWv3tz2U4d3toYKjzx7ZRKxiI+1AhEHGkCVFeDS4E3WNnH3YaV2PpaZMICDMtLMt jtElBjzjJYO5FIxc4isVE/u5Yvnrt+M= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-a2OZ-sdSN2KhOrTs4JiYSw-1; Fri, 26 Apr 2024 07:43:29 -0400 X-MC-Unique: a2OZ-sdSN2KhOrTs4JiYSw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF4B92932484; Fri, 26 Apr 2024 11:43:28 +0000 (UTC) Received: from [192.168.37.1] (ovpn-0-6.rdu2.redhat.com [10.22.0.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1563E151EF; Fri, 26 Apr 2024 11:43:27 +0000 (UTC) From: Benjamin Coddington To: Anna Schumaker Cc: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com Subject: Re: [PATCH] NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS Date: Fri, 26 Apr 2024 07:43:26 -0400 Message-ID: In-Reply-To: <20240425202429.439014-1-anna@kernel.org> References: <20240425202429.439014-1-anna@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 On 25 Apr 2024, at 16:24, Anna Schumaker wrote: > From: Anna Schumaker > > Olga showed me a case where the client was sending multiple READ_PLUS > calls to the server in parallel, and the server replied > NFS4ERR_OPNOTSUPP to each. The client would fall back to READ for the > first reply, but fail to retry the other calls. > > I fix this by removing the test for NFS_CAP_READ_PLUS in > nfs4_read_plus_not_supported(). This allows us to reschedule any > READ_PLUS call that has a NFS4ERR_OPNOTSUPP return value, even after the > capability has been cleared. > > Reported-by: Olga Kornievskaia > Fixes: c567552612ec ("NFS: Add READ_PLUS data segment support") > Cc: stable@vger.kernel.org # v5.10+ > Signed-off-by: Anna Schumaker Reviewed-by: Benjamin Coddington Ben > --- > fs/nfs/nfs4proc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c > index ea390db94b62..c93c12063b3a 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -5456,7 +5456,7 @@ static bool nfs4_read_plus_not_supported(struct rpc_task *task, > struct rpc_message *msg = &task->tk_msg; > > if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS] && > - server->caps & NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP) { > + task->tk_status == -ENOTSUPP) { > server->caps &= ~NFS_CAP_READ_PLUS; > msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ]; > rpc_restart_call_prepare(task); > -- > 2.44.0