]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
hobject_t: modify operator<<
authorSage Weil <sage@redhat.com>
Fri, 12 Dec 2014 00:25:49 +0000 (16:25 -0800)
committerSage Weil <sage@redhat.com>
Fri, 19 Jun 2015 00:02:46 +0000 (17:02 -0700)
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 <sage@redhat.com>
src/common/hobject.cc

index ba278d64041346b9e474bb7d949f4558460eb844..26693542a02eac31d817a8666034a55c5fa321b4 100644 (file)
@@ -186,11 +186,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;
 }