ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: pdonnell@redhat.com, ceph-devel@vger.kernel.org,
	Ilya Dryomov <idryomov@gmail.com>
Subject: Re: [PATCH] ceph: send opened files/pinned caps/opened inodes metrics to MDS daemon
Date: Wed, 24 Mar 2021 12:54:36 +0800	[thread overview]
Message-ID: <5f3ce92d-8c1c-d8de-1a10-bf30dc2800af@redhat.com> (raw)
In-Reply-To: <5c1461d4f7c03f226ed2458f491885cfe9b44841.camel@kernel.org>

On 2021/3/24 12:53, Xiubo Li wrote:

[...]

> > diff --git a/fs/ceph/metric.c b/fs/ceph/metric.c
> > index 5ec94bd4c1de..306bd599d940 100644
> > --- a/fs/ceph/metric.c
> > +++ b/fs/ceph/metric.c
> > @@ -17,6 +17,9 @@ static bool ceph_mdsc_send_metrics(struct 
> ceph_mds_client *mdsc,
> >      struct ceph_metric_write_latency *write;
> >      struct ceph_metric_metadata_latency *meta;
> >      struct ceph_metric_dlease *dlease;
> > +    struct ceph_opened_files *files;
> > +    struct ceph_pinned_icaps *icaps;
> > +    struct ceph_opened_inodes *inodes;
> >      struct ceph_client_metric *m = &mdsc->metric;
> >      u64 nr_caps = atomic64_read(&m->total_caps);
> >      struct ceph_msg *msg;
> > @@ -26,7 +29,8 @@ static bool ceph_mdsc_send_metrics(struct 
> ceph_mds_client *mdsc,
> >      s32 len;
> >
> >      len = sizeof(*head) + sizeof(*cap) + sizeof(*read) + 
> sizeof(*write)
> > -          + sizeof(*meta) + sizeof(*dlease);
> > +          + sizeof(*meta) + sizeof(*dlease) + sizeof(files) + 
> sizeof(icaps)
> > +          + sizeof(inodes);
> >
>
> These sizeof values look wrong. The buffer requires more than pointers
> for those. You probably want:
>
>  ... + sizeof(*files) + sizeof(*icaps) + sizeof(*inodes);
>
Yeah, will fix it.

Thanks



  parent reply	other threads:[~2021-03-24  4:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  3:47 [PATCH] ceph: send opened files/pinned caps/opened inodes metrics to MDS daemon xiubli
2021-03-22  2:30 ` Xiubo Li
2021-03-22 11:55   ` Jeff Layton
2021-03-22 12:32     ` Xiubo Li
2021-03-23 19:51       ` Jeff Layton
2021-03-24  4:54     ` Xiubo Li [this message]
2021-03-23 19:52 ` Jeff Layton

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=5f3ce92d-8c1c-d8de-1a10-bf30dc2800af@redhat.com \
    --to=xiubli@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=pdonnell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).