]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/onode-staged-tree: print the signed shard_t
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 29 Apr 2021 01:45:51 +0000 (09:45 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Sat, 8 May 2021 02:04:46 +0000 (10:04 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/stages/key_layout.h

index d5513cdce6897deab71f84f8439ff027b1b7ba90..47f6c9d7edf92014b9eebe4df456c827e95e3019 100644 (file)
@@ -53,7 +53,7 @@ struct shard_pool_t {
   pool_t pool;
 } __attribute__((packed));
 inline std::ostream& operator<<(std::ostream& os, const shard_pool_t& sp) {
-  return os << (unsigned)sp.shard << "," << sp.pool;
+  return os << (int)sp.shard << "," << sp.pool;
 }
 inline MatchKindCMP compare_to(const shard_pool_t& l, const shard_pool_t& r) {
   auto ret = toMatchKindCMP(l.shard, r.shard);
@@ -509,7 +509,7 @@ class key_hobj_t {
   MatchKindCMP compare_to(const full_key_t<KeyT::HOBJ>&) const;
 
   std::ostream& dump(std::ostream& os) const {
-    os << "key_hobj(" << (unsigned)shard() << ","
+    os << "key_hobj(" << (int)shard() << ","
        << pool() << "," << crush() << "; "
        << string_view_masked_t{nspace()} << ","
        << string_view_masked_t{oid()} << "; "
@@ -688,7 +688,7 @@ class key_view_t {
   std::ostream& dump(std::ostream& os) const {
     os << "key_view(";
     if (has_shard_pool()) {
-      os << (unsigned)shard() << "," << pool() << ",";
+      os << (int)shard() << "," << pool() << ",";
     } else {
       os << "X,X,";
     }