]> git.apps.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>
Thu, 26 Jan 2023 11:18:55 +0000 (14:18 +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 74b232897cffae46edea27443cbac1c482f89cd4..bbd5546cd908ddeba8952bab135ce1f3b2df326d 100644 (file)
@@ -1308,7 +1308,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) {
@@ -2130,7 +2132,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;
 }
@@ -2255,7 +2259,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;