From 0c86ed42f5bab29c1a82d175e97b3136d3951d33 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Thu, 7 Jul 2016 20:12:24 +0300 Subject: [PATCH] os/bluestore: remove internal structures from Bluestore.h Signed-off-by: Igor Fedotov --- src/os/bluestore/BlueStore.cc | 24 ++++++++++++++++++++++++ src/os/bluestore/BlueStore.h | 23 ----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 959a63cbb14a2..2ddc7c6583401 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3561,6 +3561,30 @@ int BlueStore::read( return r; } +// -------------------------------------------------------- +// intermediate data structures used while reading +struct region_t { + uint64_t logical_offset; + uint64_t blob_xoffset; //region offset within the blob + uint64_t length; + + region_t(uint64_t offset, uint64_t b_offs, uint64_t len) + : logical_offset(offset), + blob_xoffset(b_offs), + length(len) {} + region_t(const region_t& from) + : logical_offset(from.logical_offset), + blob_xoffset(from.blob_xoffset), + length(from.length) {} + + friend ostream& operator<<(ostream& out, const region_t& r) { + return out << "0x" << std::hex << r.logical_offset << ":" + << r.blob_xoffset << "~" << r.length << std::dec; + } +}; +typedef list regions2read_t; +typedef map blobs2read_t; + int BlueStore::_do_read( Collection *c, OnodeRef o, diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 7352d6c9d5c40..7213c6c1db6f5 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -82,29 +82,6 @@ public: class TransContext; class Blob; - // -------------------------------------------------------- - // intermediate data structures used while reading - struct region_t { - uint64_t logical_offset; - uint64_t blob_xoffset; //region offset within the blob - uint64_t length; - - region_t(uint64_t offset, uint64_t b_offs, uint64_t len) - : logical_offset(offset), - blob_xoffset(b_offs), - length(len) {} - region_t(const region_t& from) - : logical_offset(from.logical_offset), - blob_xoffset(from.blob_xoffset), - length(from.length) {} - - friend ostream& operator<<(ostream& out, const region_t& r) { - return out << "0x" << std::hex << r.logical_offset << ":" - << r.blob_xoffset << "~" << r.length << std::dec; - } - }; - typedef list regions2read_t; - typedef map blobs2read_t; typedef map ready_regions_t; struct BufferSpace; -- 2.39.5