From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C18DEB64DD for ; Wed, 9 Aug 2023 11:38:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234123AbjHILiT (ORCPT ); Wed, 9 Aug 2023 07:38:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234124AbjHILiT (ORCPT ); Wed, 9 Aug 2023 07:38:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBBFA1BFA for ; Wed, 9 Aug 2023 04:38:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6BF3E635A3 for ; Wed, 9 Aug 2023 11:38:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77222C433C7; Wed, 9 Aug 2023 11:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691581097; bh=bIjZC+gC1LrTCzylNlPNZ71ePlH1kNrg5QUBN2j29pY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9Kqn2jKOpkPxSyInTxpeXfyXSrOt8m4uwQJUIQ7eLdeR9NYEQUrq+fLXNo2awujG W2AJ5bpRx4LRJz/I5PTcg1U5Qfqd7qBn0QCqCCSITNq7pIQyhtaAcHuGs2B+W8FwDA qzor43tYZv6MrjoM7VnCoXIZnsdB7TB2REmW9m5U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiubo Li , Venky Shankar , Jeff Layton , Ilya Dryomov Subject: [PATCH 5.10 104/201] ceph: never send metrics if disable_send_metrics is set Date: Wed, 9 Aug 2023 12:41:46 +0200 Message-ID: <20230809103647.289950990@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809103643.799166053@linuxfoundation.org> References: <20230809103643.799166053@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Xiubo Li commit 50164507f6b7b7ed85d8c3ac0266849fbd908db7 upstream. Even the 'disable_send_metrics' is true so when the session is being opened it will always trigger to send the metric for the first time. Cc: stable@vger.kernel.org Signed-off-by: Xiubo Li Reviewed-by: Venky Shankar Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman --- fs/ceph/metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ceph/metric.c +++ b/fs/ceph/metric.c @@ -130,7 +130,7 @@ static void metric_delayed_work(struct w struct ceph_mds_client *mdsc = container_of(m, struct ceph_mds_client, metric); - if (mdsc->stopping) + if (mdsc->stopping || disable_send_metrics) return; if (!m->session || !check_session_state(m->session)) {