From: Igor Fedotov Date: Thu, 7 Jul 2016 17:12:24 +0000 (+0300) Subject: os/bluestore: remove internal structures from Bluestore.h X-Git-Tag: ses5-milestone5~146^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c86ed42f5bab29c1a82d175e97b3136d3951d33;p=ceph.git os/bluestore: remove internal structures from Bluestore.h Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 959a63cbb14..2ddc7c65834 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 7352d6c9d5c..7213c6c1db6 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;