All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Yanhu Cao <gmayyyha@gmail.com>
Cc: idryomov@gmail.com, ceph-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: add column 'mds' to show caps in more user friendly
Date: Mon, 24 Aug 2020 11:12:54 -0400	[thread overview]
Message-ID: <9b6b670245ae0ca8eab16263c01f6a6d1bd94e4b.camel@kernel.org> (raw)
In-Reply-To: <20200824030058.37786-1-gmayyyha@gmail.com>

On Mon, 2020-08-24 at 11:00 +0800, Yanhu Cao wrote:
> In multi-mds, the 'caps' debugfs file will have duplicate ino,
> add the 'mds' column to indicate which mds session the cap belongs to.
> 
> Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
> ---
>  fs/ceph/debugfs.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index 97539b497e4c..47f8971a9c52 100644
> --- a/fs/ceph/debugfs.c
> +++ b/fs/ceph/debugfs.c
> @@ -202,7 +202,8 @@ static int caps_show_cb(struct inode *inode, struct ceph_cap *cap, void *p)
>  {
>  	struct seq_file *s = p;
>  
> -	seq_printf(s, "0x%-17lx%-17s%-17s\n", inode->i_ino,
> +	seq_printf(s, "0x%-17lx%-3d%-17s%-17s\n", inode->i_ino,
> +		   cap->session->s_mds,
>  		   ceph_cap_string(cap->issued),
>  		   ceph_cap_string(cap->implemented));
>  	return 0;
> @@ -222,8 +223,8 @@ static int caps_show(struct seq_file *s, void *p)
>  		   "reserved\t%d\n"
>  		   "min\t\t%d\n\n",
>  		   total, avail, used, reserved, min);
> -	seq_printf(s, "ino                issued           implemented\n");
> -	seq_printf(s, "-----------------------------------------------\n");
> +	seq_printf(s, "ino              mds  issued           implemented\n");
> +	seq_printf(s, "--------------------------------------------------\n");
>  
>  	mutex_lock(&mdsc->mutex);
>  	for (i = 0; i < mdsc->max_sessions; i++) {

Looks good. Merged.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>


      reply	other threads:[~2020-08-24 15:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  3:00 [PATCH] ceph: add column 'mds' to show caps in more user friendly Yanhu Cao
2020-08-24 15:12 ` Jeff Layton [this message]

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=9b6b670245ae0ca8eab16263c01f6a6d1bd94e4b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=gmayyyha@gmail.com \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.