]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluestore_types: operator<< for AllocExtent
authorSage Weil <sage@redhat.com>
Fri, 30 Dec 2016 17:19:11 +0000 (12:19 -0500)
committerSage Weil <sage@redhat.com>
Mon, 9 Jan 2017 22:09:49 +0000 (16:09 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 8e313a24965b6ab75e6f994bbd9ddf248e382f0d)

src/os/bluestore/bluestore_types.h

index 20cda85d052893a03f467bb0a0005f3503e4eb9d..4dcbf7d702d7edc355c98d1ce8203d815fdf9d4c 100644 (file)
@@ -80,6 +80,10 @@ public:
   }
 };
 
+inline static ostream& operator<<(ostream& out, const AllocExtent& e) {
+  return out << "0x" << std::hex << e.offset << "~" << e.length << std::dec;
+}
+
 class ExtentList {
   AllocExtentVector *m_extents;
   int64_t m_num_extents;
@@ -125,7 +129,7 @@ public:
 
 
 /// pextent: physical extent
-struct bluestore_pextent_t : public AllocExtent{
+struct bluestore_pextent_t : public AllocExtent {
   const static uint64_t INVALID_OFFSET = ~0ull;
 
   bluestore_pextent_t() : AllocExtent() {}