Signed-off-by: Sage Weil <sage@redhat.com>
bool is_meta() const {
return is_meta_pool(pool);
}
+ int64_t get_logical_pool() const {
+ if (is_temp_pool(pool))
+ return get_temp_pool(pool); // it's reversible
+ else
+ return pool;
+ }
hobject_t() : snap(0), hash(0), max(false), pool(INT64_MIN) {
build_hash_cache();
bool contains(int bits, const ghobject_t& oid) {
return
- ((int64_t)m_pool == oid.hobj.pool ||
- hobject_t::get_temp_pool(m_pool) == oid.hobj.pool) &&
+ (int64_t)m_pool == oid.hobj.get_logical_pool() &&
oid.match(bits, ps());
}
bool contains(int bits, const hobject_t& oid) {
return
- ((int64_t)m_pool == oid.pool ||
- hobject_t::get_temp_pool(m_pool) == oid.pool) &&
+ (int64_t)m_pool == oid.get_logical_pool() &&
oid.match(bits, ps());
}