From: Sage Weil Date: Fri, 12 Dec 2014 00:25:49 +0000 (-0800) Subject: hobject_t: modify operator<< X-Git-Tag: v0.94.7~28^2~6^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df0e11e7783e239ae7be992b342df980d399ab95;p=ceph.git hobject_t: modify operator<< Put the most significant fields to the left so that it matches the sort order. Also use unambiguous separator when the nspace is present (like we do with the key). Signed-off-by: Sage Weil (cherry picked from commit ecdc8f697acf1627b35a83663c219a3bb0ada453) --- diff --git a/src/common/hobject.cc b/src/common/hobject.cc index 866c9928316f..c3a1694af372 100644 --- a/src/common/hobject.cc +++ b/src/common/hobject.cc @@ -195,11 +195,13 @@ ostream& operator<<(ostream& out, const hobject_t& o) { if (o.is_max()) return out << "MAX"; + out << o.pool << '/'; out << std::hex << o.get_hash() << std::dec; + if (o.nspace.length()) + out << ":" << o.nspace; if (o.get_key().length()) out << "." << o.get_key(); out << "/" << o.oid << "/" << o.snap; - out << "/" << o.nspace << "/" << o.pool; return out; }