ceph: disable sending metrics thoroughly when it's disabled
Subsystems (2)
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.
Signed-off-by Xiubo Li <[email protected]>
--- fs/ceph/metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)) {
Signature · 1 line
2.40.1
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.Signed-off-by Xiubo Li <[email protected]>--- fs/ceph/metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/metric.c +1
-2@@ -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.
Reviewed-by Venky Shankar <[email protected]>
Signature · 2 lines
Cheers, Venky
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.Signed-off-by Xiubo Li <[email protected]>--- fs/ceph/metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ceph/metric.c +0
-0
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)) {
Reviewed-by Jeff Layton <[email protected]>