From eb89c464ae47b43f2774f7ec4ee8dd8972f8b210 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Wed, 7 Apr 2021 11:08:03 +0800 Subject: [PATCH] mds: do not show the default auth if it's unambiguous Signed-off-by: Xiubo Li --- src/mds/CDentry.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mds/CDentry.cc b/src/mds/CDentry.cc index 7d8170f7316..70d33a00165 100644 --- a/src/mds/CDentry.cc +++ b/src/mds/CDentry.cc @@ -63,7 +63,10 @@ ostream& operator<<(ostream& out, const CDentry& dn) if (dn.is_replicated()) out << dn.get_replicas(); } else { - out << " rep@" << dn.authority(); + mds_authority_t a = dn.authority(); + out << " rep@" << a.first; + if (a.second != CDIR_AUTH_UNKNOWN) + out << "," << a.second; out << "." << dn.get_replica_nonce(); } -- 2.39.5