]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: output cosmetics for BlueFS
authorIgor Fedotov <igor.fedotov@croit.io>
Wed, 9 Nov 2022 14:58:52 +0000 (17:58 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 27 Jun 2023 11:47:07 +0000 (14:47 +0300)
This includes finer position specification during replay
and logging read size in hex.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit e5b7ba93191ad41c4a4beae802b7e86c8febec04)

src/os/bluestore/BlueFS.cc

index 56442d7ebec89c5a735ab6ded483fd5800df7d5e..ffa9cd785ecd1674d64fec6703f3990863c36428 100644 (file)
@@ -1191,7 +1191,9 @@ int BlueFS::_replay(bool noop, bool to_stdout)
     }
 
     auto p = t.op_bl.cbegin();
+    auto pos0 = pos;
     while (!p.end()) {
+      pos = pos0 + p.get_off();
       __u8 op;
       decode(op, p);
       switch (op) {
@@ -2013,7 +2015,9 @@ int64_t BlueFS::_read_random(
       buf->pos += r;
     }
   }
-  dout(20) << __func__ << " got " << ret << dendl;
+  dout(20) << __func__ << std::hex
+           << " got 0x" << ret
+           << std::dec  << dendl;
   --h->file->num_reading;
   return ret;
 }
@@ -2137,7 +2141,9 @@ int64_t BlueFS::_read(
     buf->pos += r;
   }
 
-  dout(20) << __func__ << " got " << ret << dendl;
+  dout(20) << __func__ << std::hex
+           << " got 0x" << ret
+           << std::dec  << dendl;
   ceph_assert(!outbl || (int)outbl->length() == ret);
   --h->file->num_reading;
   return ret;