Skip to content

Commit

Permalink
Merge pull request #12185 from xiexingguo/xxg-wip-bluestore-1125
Browse files Browse the repository at this point in the history
os/bluestore: drop member "space" from Onode

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Nov 30, 2016
2 parents c40b60b + 708e640 commit c161f64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -637,7 +637,7 @@ void BlueStore::LRUCache::_trim(uint64_t onode_max, uint64_t buffer_max)
assert(num == 1);
}
o->get(); // paranoia
o->space->onode_map.erase(o->oid);
o->c->onode_map.onode_map.erase(o->oid);
o->put();
--num;
}
Expand Down Expand Up @@ -892,7 +892,7 @@ void BlueStore::TwoQCache::_trim(uint64_t onode_max, uint64_t buffer_max)
assert(num == 1);
}
o->get(); // paranoia
o->space->onode_map.erase(o->oid);
o->c->onode_map.onode_map.erase(o->oid);
o->put();
--num;
}
Expand Down Expand Up @@ -1239,7 +1239,7 @@ void BlueStore::OnodeSpace::rename(OnodeRef& oldo,
OnodeRef o = po->second;

// install a non-existent onode at old location
oldo.reset(new Onode(this, o->c, old_oid, o->key));
oldo.reset(new Onode(o->c, old_oid, o->key));
po->second = oldo;
cache->_add_onode(po->second, 1);

Expand Down Expand Up @@ -2387,11 +2387,11 @@ BlueStore::OnodeRef BlueStore::Collection::get_onode(
return OnodeRef();

// new object, new onode
on = new Onode(&onode_map, this, oid, key);
on = new Onode(this, oid, key);
} else {
// loaded
assert(r >= 0);
on = new Onode(&onode_map, this, oid, key);
on = new Onode(this, oid, key);
on->exists = true;
bufferptr::iterator p = v.front().begin();
on->onode.decode(p);
Expand Down
4 changes: 1 addition & 3 deletions src/os/bluestore/BlueStore.h
Expand Up @@ -786,7 +786,6 @@ class BlueStore : public ObjectStore,
ghobject_t oid;
string key; ///< key under PREFIX_OBJ where we are stored

OnodeSpace *space; ///< containing OnodeSpace
boost::intrusive::list_member_hook<> lru_item;

bluestore_onode_t onode; ///< metadata stored as value in kv store
Expand All @@ -798,12 +797,11 @@ class BlueStore : public ObjectStore,
std::condition_variable flush_cond; ///< wait here for unapplied txns
set<TransContext*> flush_txns; ///< committing or wal txns

Onode(OnodeSpace *s, Collection *c, const ghobject_t& o, const string& k)
Onode(Collection *c, const ghobject_t& o, const string& k)
: nref(0),
c(c),
oid(o),
key(k),
space(s),
exists(false),
extent_map(this) {
}
Expand Down

0 comments on commit c161f64

Please sign in to comment.