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=1796384595; b=BhPAH579VkWW9carv08G6lMAQHJVGHpCexRG1KQ0C2rJbRqzLPUYurszQYZZpyziqsxx PqotoKj+XiGrdr0oos/DfpA7+8ZlRlOxXjE4LDcN6PIXq8vfQqgcsbTaciwmwpO/8jmOw 1cCdpX7Qn5iUW0BjGIwYBhkH/1+nVUKabQa4rD6VezVbDKL30XPQ0uRFgfUFzD5mvCDNi 03tS2QTN2MpEAcIf+2APImyx9+ePjqR2jvRiu8CO94HHOtgkhVqLsEAIxQw6Q/x83Gbfw FuJYWyXKxPQLNSR72gybS+BKTMPdIoNhD6TRWyxTFPKtZNzS8UerVGnX7+QWiPWhD9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384595; 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=TMcW7Tr8Bl5ds/dc/LMvdOP12IEF8YMIrZVWx8ZozAw=; b=tuwlE1Y20QZ4Zv/4xr+ZIMOZPOkzP16qUEIKUsysvP5ixFCgwgUcxxaNzW3aQ0gImdX1 Kijr78AXTbWrQQYoA1x64vHENnch7O75OqCyDLK6gAHPEnPF0miIfaOdi82VNpZHAAL/I Te1wj2g0jm15BUx11FqI0dkXCeStuFtnNLBdUbZ+ndP2D344irxh5gRQl0vYe1MbHfKc0 OF02Sy7sCg/O9p8ZuhxjKXh+7W0WZVRA5a1/fAi4SKOtLfSJG5+VScCxlmRSXlCAN2ffU GYHA5trPIhXeWyw89KiTQzIGy3RvMCyWtUjZb0vPH9z8+k+jy4SxawHIP4CNqj6zzRA== 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=EX36+dAC; 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 8EEAB606A335; Fri, 4 Dec 2026 11:43:15 +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=EX36+dAC Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEE861F0092C; Fri, 4 Dec 2026 11:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384595; bh=TMcW7Tr8Bl5ds/dc/LMvdOP12IEF8YMIrZVWx8ZozAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EX36+dACXx7lyiJdTBG5ZcxR4Konkzy6D4gfLsOeHiRmMEOTbAnarvtpHebjIW2mI DLtgMzk3JClMy4w8AYMh07Xj5OlejHZMDjmh9YfTrqAcJIXJmh9YLF1JgDvRwV+pyE 9jnvHn6B/wimGOCP4Y745YP8/DAJt/VN1RCiLqjo= 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.6 0216/1167] NFSv4.1: retain MDS I/O until both thresholds are met Date: Fri, 4 Dec 2026 18:54:03 +0900 Message-ID: <20261204100707.697189179@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 6c322f4804589..66e7da21e286c 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1937,7 +1937,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