All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: xiubli@redhat.com, idryomov@gmail.com
Cc: zyan@redhat.com, pdonnell@redhat.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] ceph: check the METRIC_COLLECT feature before sending metrics
Date: Thu, 18 Jun 2020 10:43:35 -0400	[thread overview]
Message-ID: <00a99a4873e2bb1dbfff995c2ff49fdbe5ea5aaf.camel@kernel.org> (raw)
In-Reply-To: <1592481599-7851-4-git-send-email-xiubli@redhat.com>

On Thu, 2020-06-18 at 07:59 -0400, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
> 
> Skip the MDS sessions if they don't support the metric collection,
> or the MDSs will close the socket connections directly when it get
> an unknown type message.
> 
> URL: https://tracker.ceph.com/issues/43215
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>  fs/ceph/mds_client.h | 4 +++-
>  fs/ceph/metric.c     | 8 ++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
> index bcb3892..3c65ac1 100644
> --- a/fs/ceph/mds_client.h
> +++ b/fs/ceph/mds_client.h
> @@ -28,8 +28,9 @@ enum ceph_feature_type {
>  	CEPHFS_FEATURE_LAZY_CAP_WANTED,
>  	CEPHFS_FEATURE_MULTI_RECONNECT,
>  	CEPHFS_FEATURE_DELEG_INO,
> +	CEPHFS_FEATURE_METRIC_COLLECT,
>  
> -	CEPHFS_FEATURE_MAX = CEPHFS_FEATURE_DELEG_INO,
> +	CEPHFS_FEATURE_MAX = CEPHFS_FEATURE_METRIC_COLLECT,
>  };
>  
>  /*
> @@ -43,6 +44,7 @@ enum ceph_feature_type {
>  	CEPHFS_FEATURE_LAZY_CAP_WANTED,		\
>  	CEPHFS_FEATURE_MULTI_RECONNECT,		\
>  	CEPHFS_FEATURE_DELEG_INO,		\
> +	CEPHFS_FEATURE_METRIC_COLLECT,		\
>  						\
>  	CEPHFS_FEATURE_MAX,			\
>  }
> diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
> index 27cb541..4267b46 100644
> --- a/fs/ceph/metric.c
> +++ b/fs/ceph/metric.c
> @@ -127,6 +127,14 @@ static void metric_delayed_work(struct work_struct *work)
>  			continue;
>  		}
>  
> +		/*
> +		 * Skip it if MDS doesn't support the metric collection,
> +		 * or the MDS will close the session's socket connection
> +		 * directly when it get this message.
> +		 */
> +		if (!test_bit(CEPHFS_FEATURE_METRIC_COLLECT, &s->s_features))
> +			continue;
> +
>  		/* Only send the metric once in any available session */
>  		ret = ceph_mdsc_send_metrics(mdsc, s, nr_caps);
>  		ceph_put_mds_session(s);

This should probably be moved ahead of, or folded into the previous
patch to prevent a regression should someone land in between them when
bisecting.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2020-06-18 14:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 11:59 [PATCH v2 0/5] ceph: periodically send perf metrics to ceph xiubli
2020-06-18 11:59 ` [PATCH v2 1/5] ceph: add check_session_state helper and make it global xiubli
2020-06-18 11:59 ` [PATCH v2 2/5] ceph: periodically send perf metrics to ceph xiubli
2020-06-18 14:42   ` Jeff Layton
2020-06-19  0:37     ` Xiubo Li
2020-06-19  9:35       ` Ilya Dryomov
2020-06-19 12:22         ` Jeff Layton
2020-06-22  1:19           ` Xiubo Li
2020-06-22  0:54         ` Xiubo Li
2020-06-18 11:59 ` [PATCH v2 3/5] ceph: check the METRIC_COLLECT feature before sending metrics xiubli
2020-06-18 14:43   ` Jeff Layton [this message]
2020-06-19  0:39     ` Xiubo Li
2020-06-18 11:59 ` [PATCH v2 4/5] ceph: switch to WARN_ON and bubble up errnos to the callers xiubli
2020-06-18 11:59 ` [PATCH v2 5/5] ceph: send client provided metric flags in client metadata xiubli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00a99a4873e2bb1dbfff995c2ff49fdbe5ea5aaf.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=pdonnell@redhat.com \
    --cc=xiubli@redhat.com \
    --cc=zyan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.