Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp780468rdb; Sun, 28 Jan 2024 08:37:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZPv0/AdBADlfFYc8nvt/SL6a0qZR+vk6x1UW2xha/GjCyTHUUuprOt8I2+Z5geN6yjM2y X-Received: by 2002:a17:902:da89:b0:1d8:bb09:6bf5 with SMTP id j9-20020a170902da8900b001d8bb096bf5mr1062334plx.28.1706459834537; Sun, 28 Jan 2024 08:37:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706459834; cv=pass; d=google.com; s=arc-20160816; b=pIgsW4XabfcefBZaNF/iokcKdw6X9ac0oF7lLyRM66MEml54vkS0O6CyCEJgWcCuUw CekT0IycIlnGnl8X4jl4w08xybllOMTNNUfhB4/vg/pID6kZtfIFA7n1c+nz2OIMgjc0 VoQa9YY82yg866Lfhrx1tZ+SINhtXxkMAawUv3wQz9ROYKU+StNxsvu7d/R4tRID2wh7 LybV5np5cvzai4OBoaoOEytkylYQQswDSYRZ8UY0Nv6VFse6ebXA6YBOO1lSuM3MVDMF qB73taJFKNODw1Bumug9j6RHNXVpauMZJgiltWxjMMlMrejlkPaTvw/WVgSPFbYOth+t SYkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZPyWv4jDbTfgHVx9Skrdit3Ge0CfLZrG4ifJ3AyuP1A=; fh=vMcpTn/zq+NT5SskVwNHWRU+Z5Er2Cfr2TDwzxgHe6M=; b=vEYb/4LHOOrXmrlZVhlcj0F/ppGM8SKygv1KsxEf8s80kK8yQIrwkL8e9km/oybGMA sAQC9p9x5MSiMgdRjhMMZyUrLFNn5EyGDLiGql2HrR825hw4at7alxWWTfwQF29qQSyq r8zt20PC8L4Xdp9wVlTH36/j4Gd3c4n98rJpKY43xnRyvV7Mmba64gcS3aKFQcodMB+c BZdZNILKmt7vHPMKF/u38dyJL2Y/jfCBQLDoS/kE6yTiDWMecMYMzfrGa06JWDCHQt03 gh+GpAgchrAhG1EvdAQ1QaEQyKjgiCnFBG7xTaPkBg44VdgbEJ/CPK4XCvRkmZs2ZMcv s/KQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rnpfjvmb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i9-20020a17090332c900b001d8975bd55bsi4336878plr.224.2024.01.28.08.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 08:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rnpfjvmb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8BF0D281E2F for ; Sun, 28 Jan 2024 16:36:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 867A186151; Sun, 28 Jan 2024 16:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rnpfjvmb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 99E8185C72; Sun, 28 Jan 2024 16:14:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706458499; cv=none; b=A7mw52kUh8vw8xNKIqCWSoaOEHct+K01HPi4Z17lUgX9PeEA99iqNwD+JEwjIhrntwOF3if7oIbcFuiqxEKkNgHYcK5QunWU0WwZPQbBmJ82urw0HzFUhTIAIPlXyGJJJu8j28uTaKEjv5a5lRb+zyfRv3vzdJD1upVB1jF+6/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706458499; c=relaxed/simple; bh=OQh/WkUxd9pGHLShgHQD+MmfBJhAHHbHq4FOwNrwc50=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iOq7ULIe9nZnwNjiXffc58+TugJW6zh2fNulrE5KPc/bWVG4fGdNGjVFwLaZpns5xgWPONJ2DN+sVcCOOCrrQ0as/3dLG+TqXLL956/oAFeHBDHsU8xDlDAz9JgAhyaYLEWV8ABuhIkr+foB3A5XHeH2DqzWC2tCx4m4wq8LrH4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rnpfjvmb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1D28C433C7; Sun, 28 Jan 2024 16:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706458499; bh=OQh/WkUxd9pGHLShgHQD+MmfBJhAHHbHq4FOwNrwc50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rnpfjvmb6qbKXI7dC8LIeM47yAfok6s674cO2psLBztsSiJqgjHkrfU6vrFYCoctq SlGRq0gUn0gEiEiRKdamB9gt1t+Id787K68glOVLxajItrCYVQ30wjNIXAlXh2w1uy zEmFOnUBii2AcW1m9sQ726bzRID7aha6+jbqf2U5WWBNda68sSoZ8iS/KMZ2jZOik9 NPoobDKLxnuRAFembaWT+VKeTbWIu7/MczSsI726x/Rqjg0J4XFtGYR1qVv03X3EZl bv3bVXEKCpHiYkAsld9fX0W0pCwYCd0obXn1Xc24BhcEHuvcgaecbuAAzGibgC8jz6 0J5ViOEIzeGcw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Venky Shankar , Xiubo Li , Ilya Dryomov , Sasha Levin , ceph-devel@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 20/27] ceph: reinitialize mds feature bit even when session in open Date: Sun, 28 Jan 2024 11:14:05 -0500 Message-ID: <20240128161424.203600-20-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240128161424.203600-1-sashal@kernel.org> References: <20240128161424.203600-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.75 Content-Transfer-Encoding: 8bit From: Venky Shankar [ Upstream commit f48e0342a74d7770cdf1d11894bdc3b6d989b29e ] Following along the same lines as per the user-space fix. Right now this isn't really an issue with the ceph kernel driver because of the feature bit laginess, however, that can change over time (when the new snaprealm info type is ported to the kernel driver) and depending on the MDS version that's being upgraded can cause message decoding issues - so, fix that early on. Link: http://tracker.ceph.com/issues/63188 Signed-off-by: Venky Shankar Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin --- fs/ceph/mds_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 82874be94524..da9fcf48ab6c 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -3650,11 +3650,11 @@ static void handle_session(struct ceph_mds_session *session, if (session->s_state == CEPH_MDS_SESSION_RECONNECTING) pr_info("mds%d reconnect success\n", session->s_mds); + session->s_features = features; if (session->s_state == CEPH_MDS_SESSION_OPEN) { pr_notice("mds%d is already opened\n", session->s_mds); } else { session->s_state = CEPH_MDS_SESSION_OPEN; - session->s_features = features; renewed_caps(mdsc, session, 0); if (test_bit(CEPHFS_FEATURE_METRIC_COLLECT, &session->s_features)) -- 2.43.0