@@ -58,24 +58,26 @@ struct node_offset_packed_t {
5858// TODO: consider alignments
5959struct shard_pool_t {
6060 bool operator ==(const shard_pool_t & x) const {
61- return (shard == x.shard && pool == x.pool );
61+ return (shard == x.shard && pool () == x.pool () );
6262 }
6363 bool operator !=(const shard_pool_t & x) const { return !(*this == x); }
6464
65+ pool_t pool () const { return _pool; }
66+
6567 template <KeyT KT>
6668 static shard_pool_t from_key (const full_key_t <KT>& key);
6769
6870 shard_t shard;
69- pool_t pool ;
71+ pool_t _pool ;
7072} __attribute__((packed));
7173inline std::ostream& operator <<(std::ostream& os, const shard_pool_t & sp) {
72- return os << (int )sp.shard << " ," << sp.pool ;
74+ return os << (int )sp.shard << " ," << sp.pool () ;
7375}
7476inline MatchKindCMP compare_to (const shard_pool_t & l, const shard_pool_t & r) {
7577 auto ret = toMatchKindCMP (l.shard , r.shard );
7678 if (ret != MatchKindCMP::EQ)
7779 return ret;
78- return toMatchKindCMP (l.pool , r.pool );
80+ return toMatchKindCMP (l.pool () , r.pool () );
7981}
8082
8183// Note: this is the reversed version of the object hash
@@ -621,7 +623,7 @@ class key_view_t {
621623 return shard_pool_packed ().shard ;
622624 }
623625 pool_t pool () const {
624- return shard_pool_packed ().pool ;
626+ return shard_pool_packed ().pool () ;
625627 }
626628 crush_hash_t crush () const {
627629 return crush_packed ().crush ;
@@ -841,7 +843,7 @@ MatchKindCMP compare_to(const full_key_t<Type>& key, const shard_pool_t& target)
841843 auto ret = toMatchKindCMP (key.shard (), target.shard );
842844 if (ret != MatchKindCMP::EQ)
843845 return ret;
844- return toMatchKindCMP (key.pool (), target.pool );
846+ return toMatchKindCMP (key.pool (), target.pool () );
845847}
846848
847849template <KeyT Type>
0 commit comments