Skip to content

Commit

Permalink
ceph: never send metrics if disable_send_metrics is set
Browse files Browse the repository at this point in the history
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 <xiubli@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Xiubo Li authored and Ilya Dryomov committed Jul 24, 2023
1 parent 6eaae19 commit 5016450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/metric.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 5016450

Please sign in to comment.