static_assert(sizeof(snap_t) == sizeof(ghobject_t().hobj.snap.val));
static_assert(sizeof(gen_t) == sizeof(ghobject_t().generation));
+constexpr auto MAX_SHARD = std::numeric_limits<shard_t>::max();
+constexpr auto MAX_POOL = std::numeric_limits<pool_t>::max();
+constexpr auto MAX_CRUSH = std::numeric_limits<crush_hash_t>::max();
+constexpr auto MAX_SNAP = std::numeric_limits<snap_t>::max();
+constexpr auto MAX_GEN = std::numeric_limits<gen_t>::max();
+
class NodeExtentMutable;
class key_view_t;
class key_hobj_t;
const std::pair<index_t, index_t>& range1,
const std::pair<index_t, index_t>& range0) {
ceph_assert(range2.first < range2.second);
- ceph_assert(range2.second - 1 <= (index_t)std::numeric_limits<shard_t>::max());
- ceph_assert(range2.second - 1 <= std::numeric_limits<crush_hash_t>::max());
+ ceph_assert(range2.second - 1 <= MAX_SHARD);
+ ceph_assert(range2.second - 1 <= MAX_CRUSH);
ceph_assert(range1.first < range1.second);
ceph_assert(range1.second - 1 <= 9);
ceph_assert(range0.first < range0.second);