]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
blk: start 1st line of hexdump() on a new line 42813/head
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 17 Aug 2021 08:56:38 +0000 (10:56 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 19 Aug 2021 21:44:43 +0000 (23:44 +0200)
Otherwise the fist line looks rather strange

```
2021-08-19T23:42:33.604+0200 4f60700 40 bdev:kd:965(0x4fab180 /usr/local/src/wip.bluestore-test/build/dev/osd0/block.db) data: 00000000  56 f9 b8 f8 1c 00 01 01  1a 6c 65 76 65 6c 64 62  |V........leveldb|
00000010  2e 42 79 74 65 77 69 73  65 43 6f 6d 70 61 72 61  |.BytewiseCompara|
00000020  74 6f 72 98 af 58 a6 02  00 01 02 00 d2 c7 3c 95  |tor..X........<.|
00000030  06 00 01 09 00 03 04 04  00 6b 93 6d c5 2b 00 01  |.........k.m.+..|
00000040  01 1a 6c 65 76 65 6c 64  62 2e 42 79 74 65 77 69  |..leveldb.Bytewi|
.....
```

versus new:
```
2021-08-19T23:42:33.604+0200 4f60700 40 bdev:kd:965(0x4fab180 /usr/local/src/wip.bluestore-test/build/dev/osd0/block.db) data:
00000000  56 f9 b8 f8 1c 00 01 01  1a 6c 65 76 65 6c 64 62  |V........leveldb|
00000010  2e 42 79 74 65 77 69 73  65 43 6f 6d 70 61 72 61  |.BytewiseCompara|
00000020  74 6f 72 98 af 58 a6 02  00 01 02 00 d2 c7 3c 95  |tor..X........<.|
00000030  06 00 01 09 00 03 04 04  00 6b 93 6d c5 2b 00 01  |.........k.m.+..|
00000040  01 1a 6c 65 76 65 6c 64  62 2e 42 79 74 65 77 69  |..leveldb.Bytewi|
.....
```

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/blk/kernel/KernelDevice.cc
src/blk/pmem/PMEMDevice.cc
src/blk/zoned/HMSMRDevice.cc

index 66e9bc622d788d0136af6a27832e343258fe87c6..d8f65baa0aa329097059c062db3af36eee9b8fac 100644 (file)
@@ -915,7 +915,7 @@ int KernelDevice::write(
       bl.rebuild_aligned_size_and_memory(block_size, block_size, IOV_MAX)) {
     dout(20) << __func__ << " rebuilding buffer to be aligned" << dendl;
   }
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   bl.hexdump(*_dout);
   *_dout << dendl;
 
@@ -944,7 +944,7 @@ int KernelDevice::aio_write(
       bl.rebuild_aligned_size_and_memory(block_size, block_size, IOV_MAX)) {
     dout(20) << __func__ << " rebuilding buffer to be aligned" << dendl;
   }
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   bl.hexdump(*_dout);
   *_dout << dendl;
 
@@ -1071,7 +1071,7 @@ int KernelDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
   ceph_assert((uint64_t)r == len);
   pbl->push_back(std::move(p));
 
-  dout(40) << "data: ";
+  dout(40) << "data:\n"; 
   pbl->hexdump(*_dout);
   *_dout << dendl;
 
@@ -1141,7 +1141,7 @@ int KernelDevice::direct_read_unaligned(uint64_t off, uint64_t len, char *buf)
   ceph_assert((uint64_t)r == aligned_len);
   memcpy(buf, p.c_str() + (off - aligned_off), len);
 
-  dout(40) << __func__ << " data: ";
+  dout(40) << __func__ << " data:\n";
   bufferlist bl;
   bl.append(buf, len);
   bl.hexdump(*_dout);
@@ -1214,7 +1214,7 @@ int KernelDevice::read_random(uint64_t off, uint64_t len, char *buf,
     ceph_assert((uint64_t)r == len);
   }
 
-  dout(40) << __func__ << " data: ";
+  dout(40) << __func__ << " data:\n";
   bufferlist bl;
   bl.append(buf, len);
   bl.hexdump(*_dout);
index 247ed0692ed82ff6702464a1468f157319d0ca61..7bc1321e34fd473ec1fa8f4bd091b04197098fdb 100644 (file)
@@ -202,7 +202,7 @@ int PMEMDevice::write(uint64_t off, bufferlist& bl, bool buffered, int write_hin
   dout(20) << __func__ << " " << off << "~" << len  << dendl;
   ceph_assert(is_valid_io(off, len));
 
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   bl.hexdump(*_dout);
   *_dout << dendl;
 
@@ -250,7 +250,7 @@ int PMEMDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
   pbl->clear();
   pbl->push_back(std::move(p));
 
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   pbl->hexdump(*_dout);
   *_dout << dendl;
 
index dd5101e4deb2eb6b0b04e38f1e9585b05bb84ccf..0ff2f70af3d39faba7bb911e233e517d24fefa05 100644 (file)
@@ -901,7 +901,7 @@ int HMSMRDevice::write(
       bl.rebuild_aligned_size_and_memory(block_size, block_size, IOV_MAX)) {
     dout(20) << __func__ << " rebuilding buffer to be aligned" << dendl;
   }
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   bl.hexdump(*_dout);
   *_dout << dendl;
 
@@ -930,7 +930,7 @@ int HMSMRDevice::aio_write(
       bl.rebuild_aligned_size_and_memory(block_size, block_size, IOV_MAX)) {
     dout(20) << __func__ << " rebuilding buffer to be aligned" << dendl;
   }
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   bl.hexdump(*_dout);
   *_dout << dendl;
 
@@ -1056,7 +1056,7 @@ int HMSMRDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
   ceph_assert((uint64_t)r == len);
   pbl->push_back(std::move(p));
 
-  dout(40) << "data: ";
+  dout(40) << "data:\n";
   pbl->hexdump(*_dout);
   *_dout << dendl;
 
@@ -1126,7 +1126,7 @@ int HMSMRDevice::direct_read_unaligned(uint64_t off, uint64_t len, char *buf)
   ceph_assert((uint64_t)r == aligned_len);
   memcpy(buf, p.c_str() + (off - aligned_off), len);
 
-  dout(40) << __func__ << " data: ";
+  dout(40) << __func__ << " data:\n";
   bufferlist bl;
   bl.append(buf, len);
   bl.hexdump(*_dout);
@@ -1199,7 +1199,7 @@ int HMSMRDevice::read_random(uint64_t off, uint64_t len, char *buf,
     ceph_assert((uint64_t)r == len);
   }
 
-  dout(40) << __func__ << " data: ";
+  dout(40) << __func__ << " data:\n";
   bufferlist bl;
   bl.append(buf, len);
   bl.hexdump(*_dout);