Skip to contentSkip to conversation

ceph: disable sending metrics thoroughly when it's disabled

PATCH In review [email protected] 3 participants 3 messages Jul 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: disable sending metrics thoroughly when it's disabled

From: Xiubo Li <[email protected]>

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.

---
 fs/ceph/metric.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/metric.c +1 -1
index cce78d769f55..6d3584f16f9a 100644
@@ -216,7 +216,7 @@ static void metric_delayed_work(struct work_struct *work)
 	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)) {
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · On Thu, Jul 20, 2023 at 9:09 AM <[email protected]> wrote:

From: Xiubo Li <[email protected]>

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.

---
 fs/ceph/metric.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/metric.c +1 -2
index cce78d769f55..6d3584f16f9a 100644
@@ -216,7 +216,7 @@ static void metric_delayed_work(struct work_struct *work)
        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)) {
--
Quoted 2 lines

2.40.1

LGTM.

Signature · 2 lines
Cheers,
Venky
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 17 lines · On Thu, 2023-07-20 at 11:38 +0800, [email protected] wrote:

From: Xiubo Li <[email protected]>

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.

---
 fs/ceph/metric.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ceph/metric.c +0 -0
index cce78d769f55..6d3584f16f9a 100644

fs/ceph/metric.c static void metric_delayed_work(struct work_struct *work) · line 222

Quoted 8 lines
fs/ceph/metric.c +1 -1
@@ -216,7 +216,7 @@ static void metric_delayed_work(struct work_struct *work)
 	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)) {