Merge pull request #12850 from xiexingguo/xxg-wip-bluestore-20170110

os/bluestore: shrink buffer_map key into uint32_t

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
This commit is contained in:
Sage Weil 2017-01-10 07:33:18 -06:00 committed by GitHub
commit c96cb2d02e

View File

@ -215,7 +215,7 @@ public:
boost::intrusive::list_member_hook<>,
&Buffer::state_item> > state_list_t;
mempool::bluestore_meta_other::map<uint64_t, std::unique_ptr<Buffer>>
mempool::bluestore_meta_other::map<uint32_t, std::unique_ptr<Buffer>>
buffer_map;
Cache *cache;
@ -250,7 +250,7 @@ public:
void _rm_buffer(Buffer *b) {
_rm_buffer(buffer_map.find(b->offset));
}
void _rm_buffer(map<uint64_t,std::unique_ptr<Buffer>>::iterator p) {
void _rm_buffer(map<uint32_t,std::unique_ptr<Buffer>>::iterator p) {
assert(p != buffer_map.end());
cache->_audit("_rm_buffer start");
if (p->second->is_writing()) {
@ -262,7 +262,7 @@ public:
cache->_audit("_rm_buffer end");
}
map<uint64_t,std::unique_ptr<Buffer>>::iterator _data_lower_bound(
map<uint32_t,std::unique_ptr<Buffer>>::iterator _data_lower_bound(
uint64_t offset) {
auto i = buffer_map.lower_bound(offset);
if (i != buffer_map.begin()) {