From a8f138cd3623e42c4f74a18d54ec7dfcc1e89e58 Mon Sep 17 00:00:00 2001 From: haoyixing Date: Tue, 14 Jun 2022 08:45:13 +0000 Subject: mds/MDBalancer: add an arg to limit depth when dump loads for dirfrags Directory hierarchy may be deep for a large filesystem, dump loads would output a lot and take a long time. So add an arg to limit depth when dump loads of dirfrags. Fixes: https://tracker.ceph.com/issues/56058 Signed-off-by: haoyixing --- src/mds/MDSDaemon.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mds/MDSDaemon.cc') diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index c31c86d3763..91440f11e95 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -340,7 +340,8 @@ void MDSDaemon::set_up_admin_socket() asok_hook, "dump metadata cache for subtree"); ceph_assert(r == 0); - r = admin_socket->register_command("dump loads", + r = admin_socket->register_command("dump loads " + "name=depth,type=CephInt,range=0,req=false", asok_hook, "dump metadata loads"); ceph_assert(r == 0); -- cgit v1.2.3