Re: [PATCH 1/2] ceph: add status debug file support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020/11/10 15:51, Ilya Dryomov wrote:
On Thu, Nov 5, 2020 at 3:37 AM <xiubli@xxxxxxxxxx> wrote:
From: Xiubo Li <xiubli@xxxxxxxxxx>

This will help list some useful client side info, like the client
entity address/name and bloclisted status, etc.

URL: https://tracker.ceph.com/issues/48057
Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
  fs/ceph/debugfs.c | 22 ++++++++++++++++++++++
  fs/ceph/super.h   |  1 +
  2 files changed, 23 insertions(+)

diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 7a8fbe3e4751..8b6db73c94ad 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -14,6 +14,7 @@
  #include <linux/ceph/mon_client.h>
  #include <linux/ceph/auth.h>
  #include <linux/ceph/debugfs.h>
+#include <linux/ceph/messenger.h>

  #include "super.h"

@@ -127,6 +128,20 @@ static int mdsc_show(struct seq_file *s, void *p)
         return 0;
  }

+static int status_show(struct seq_file *s, void *p)
+{
+       struct ceph_fs_client *fsc = s->private;
+       struct ceph_messenger *msgr = &fsc->client->msgr;
+       struct ceph_entity_inst *inst = &msgr->inst;
+
+       seq_printf(s, "status:\n\n"),
Hi Xiubo,

This header and leading tabs seem rather useless to me.

Sure, will remove them.


+       seq_printf(s, "\tinst_str:\t%s.%lld  %s/%u\n", ENTITY_NAME(inst->name),
                                              ^^ two spaces?

+                  ceph_pr_addr(&inst->addr), le32_to_cpu(inst->addr.nonce));
+       seq_printf(s, "\tblocklisted:\t%s\n", fsc->blocklisted ? "true" : "false");
This line is too long.

Will fix it.

Thank Ilya.


Thanks,

                 Ilya





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux