diff options
author | Sage Weil <sage@redhat.com> | 2019-08-20 23:39:28 +0200 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2019-08-20 23:39:28 +0200 |
commit | 11e1c96f63bc24d9086db8ef31f5c2dc08352103 (patch) | |
tree | 7bd527b8cdfe4866dff1aaf20de144127de2679f | |
parent | Merge PR #29759 into master (diff) | |
parent | os/bluestore: prefix omap of temp objects by real pool (diff) | |
download | ceph-11e1c96f63bc24d9086db8ef31f5c2dc08352103.tar.xz ceph-11e1c96f63bc24d9086db8ef31f5c2dc08352103.zip |
Merge PR #29717 into master
* refs/pull/29717/head:
os/bluestore: prefix omap of temp objects by real pool
Reviewed-by: Sage Weil <sage@redhat.com>
-rw-r--r-- | src/os/bluestore/BlueStore.cc | 8 | ||||
-rw-r--r-- | src/os/bluestore/BlueStore.h | 4 | ||||
-rw-r--r-- | src/osd/osd_types.h | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 8ef4c62eb9d..8c8d6488648 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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('-'); @@ -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('.'); @@ -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()); @@ -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('~'); diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 9769ab5fed5..6250ad1fcc5 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -1292,6 +1292,10 @@ public: return false; } + int64_t pool() const { + return cid.pool(); + } + void split_cache(Collection *dest); bool flush_commit(Context *c) override; diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 3e5e71ccdfa..b077c0aba2e 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -742,6 +742,9 @@ public: } return false; } + int64_t pool() const { + return pgid.pool(); + } void encode(ceph::buffer::list& bl) const; void decode(ceph::buffer::list::const_iterator& bl); |