Skip to content

Commit

Permalink
Merge PR #29717 into master
Browse files Browse the repository at this point in the history
* refs/pull/29717/head:
	os/bluestore: prefix omap of temp objects by real pool

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Aug 20, 2019
2 parents 76bfe8a + e924b84 commit 11e1c96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@ const string& BlueStore::Onode::get_omap_prefix()
void BlueStore::Onode::get_omap_header(string *out)
{
if (onode.is_perpool_omap() && !onode.is_pgmeta_omap()) {
_key_encode_u64(oid.hobj.pool, out);
_key_encode_u64(c->pool(), out);
}
_key_encode_u64(onode.nid, out);
out->push_back('-');
Expand All @@ -3298,7 +3298,7 @@ void BlueStore::Onode::get_omap_header(string *out)
void BlueStore::Onode::get_omap_key(const string& key, string *out)
{
if (onode.is_perpool_omap() && !onode.is_pgmeta_omap()) {
_key_encode_u64(oid.hobj.pool, out);
_key_encode_u64(c->pool(), out);
}
_key_encode_u64(onode.nid, out);
out->push_back('.');
Expand All @@ -3308,7 +3308,7 @@ void BlueStore::Onode::get_omap_key(const string& key, string *out)
void BlueStore::Onode::rewrite_omap_key(const string& old, string *out)
{
if (onode.is_perpool_omap() && !onode.is_pgmeta_omap()) {
_key_encode_u64(oid.hobj.pool, out);
_key_encode_u64(c->pool(), out);
}
_key_encode_u64(onode.nid, out);
out->append(old.c_str() + out->length(), old.size() - out->length());
Expand All @@ -3317,7 +3317,7 @@ void BlueStore::Onode::rewrite_omap_key(const string& old, string *out)
void BlueStore::Onode::get_omap_tail(string *out)
{
if (onode.is_perpool_omap() && !onode.is_pgmeta_omap()) {
_key_encode_u64(oid.hobj.pool, out);
_key_encode_u64(c->pool(), out);
}
_key_encode_u64(onode.nid, out);
out->push_back('~');
Expand Down
4 changes: 4 additions & 0 deletions src/os/bluestore/BlueStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,10 @@ class BlueStore : public ObjectStore,
return false;
}

int64_t pool() const {
return cid.pool();
}

void split_cache(Collection *dest);

bool flush_commit(Context *c) override;
Expand Down
3 changes: 3 additions & 0 deletions src/osd/osd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ class coll_t {
}
return false;
}
int64_t pool() const {
return pgid.pool();
}

void encode(ceph::buffer::list& bl) const;
void decode(ceph::buffer::list::const_iterator& bl);
Expand Down

0 comments on commit 11e1c96

Please sign in to comment.