* [PATCH] ceph: add column 'mds' to show caps in more user friendly
@ 2020-08-24 3:00 Yanhu Cao
2020-08-24 15:12 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Yanhu Cao @ 2020-08-24 3:00 UTC (permalink / raw)
To: jlayton; +Cc: idryomov, ceph-devel, linux-kernel, Yanhu Cao
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++) {
--
2.24.3 (Apple Git-128)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: add column 'mds' to show caps in more user friendly
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2020-08-24 15:12 UTC (permalink / raw)
To: Yanhu Cao; +Cc: idryomov, ceph-devel, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-24 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.