From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387243; b=1XKhv61+xipr+fFNdwX4MmkNfJNtmZNnSaoDloI8W6mGkRUO8ZX8ek0yVHBdLsRPRI/S HJXFqUxqx8P4fC/gKiQ3Os+fF3sQzAR/ef/ORZZINg+ai9thwSE6udyKY3Pl3hnqJ+ICj 52xRr9N3hkvjLJjgSaB/C3kHVGVDl1mynXSBJ2CNkKoAKvzYRaY3ru/CSlD1NKvBSSx4Y SvQ/6fza5RyTfE6gv+sxdrERsqn0yFtAOXYf+N5YrZCZfcn8TMVmgQr8UHi/RAu8cYrm7 IwMRbdj1W42p6TP2CmrZkGPRzQoVdNsLEKPppfPFfAc7RwoYktvukds7HcghuZKnWSw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387243; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=Mj33xa4zvJzijaVNDfLtOqllOaO9aujkfGDeZUwz4VQ=; b=l7Kqhj8GYtB/HQGv1jstZdIH+2YdQdgtqIzdzXFaHhgwkY/PvcjbtST0sW71qo6meBD1 wYdQodMlUw3xRHmC133d4P8P++j7iGR3sD4hHDUFYfZXtw0pzDKLZKFm/B/Ko6B7SxX5s ZFYJfp0PoLzE7XermR27QCD7ljV0JuzfzXAhJySBP7k1rfBQFdTjBnZLBkEC3tJHsReWi sHBE425tH1Klcxcg2YY+MxAfXkLE6haw4Iegw3AVQ04cOyAOwE7F/gGjwpTR8SUReubAU pwUf5wNcKzXinQ/htRjk/jIehYpYVUBgCiMmsmA+WESlnhqWvD2pEfDrZwG0bh1Al7g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cf9xF1fX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65F29606A32F; Fri, 4 Dec 2026 12:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cf9xF1fX Received: by smtp.kernel.org (Postfix) with ESMTPSA id D93371F000C2; Fri, 4 Dec 2026 12:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387243; bh=Mj33xa4zvJzijaVNDfLtOqllOaO9aujkfGDeZUwz4VQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cf9xF1fXPZ/ic8wkUj1JcOFSKAZhsitaFqtc6t1ZMk2Gg1Me5peEyD5a4MTUNnqOa NID/slB2hWJuEHe01TiU1aVXcYf2RmCnQ7Fmn0LKagbh3QFGago4oqM2rA5BA9MWsC UHRHSO3vT5pwx+h4j1z7+s4eyDwo23zru1d6rSIw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Avi Weiss , Anna Schumaker , Sasha Levin Subject: [PATCH 6.1 0163/1059] NFSv4.1: retain MDS I/O until both thresholds are met Date: Fri, 4 Dec 2026 18:54:54 +0900 Message-ID: <20261204100648.449409808@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Avi Weiss [ Upstream commit eab627dcd18a18a44a2cbee47df3058d3637ba0d ] When both size and I/O thresholds are configured, pnfs_within_mdsthreshold() uses size && io to decide whether to keep I/O on the MDS. Both variables indicate an unmet threshold, so reaching only one threshold returns false and may trigger pNFS layout acquisition while the other threshold remains unmet. Use logical OR instead of AND to stay with MDS I/O until both thresholds are met, as recommended by RFC 8881 Section 5.12.6. The new RFC contains the same threshold selection rule as RFC 5661 which is referenced in function comment. Fixes: d23d61c8d351 ("NFSv4.1 test the mdsthreshold hint parameters") Signed-off-by: Avi Weiss Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index e188a2cfae419..9e1c50e0d6a53 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1927,7 +1927,7 @@ static bool pnfs_within_mdsthreshold(struct nfs_open_context *ctx, break; } if (size_set && io_set) { - if (size && io) + if (size || io) ret = true; } else if (size || io) ret = true; -- 2.53.0