Limit pg_size by 64
This commit is contained in:
@@ -416,7 +416,8 @@ void etcd_state_client_t::parse_state(const etcd_kv_t & kv)
|
|||||||
if (pc.pg_size < 1 ||
|
if (pc.pg_size < 1 ||
|
||||||
pool_item.second["pg_size"].uint64_value() < 3 &&
|
pool_item.second["pg_size"].uint64_value() < 3 &&
|
||||||
(pc.scheme == POOL_SCHEME_XOR || pc.scheme == POOL_SCHEME_EC) ||
|
(pc.scheme == POOL_SCHEME_XOR || pc.scheme == POOL_SCHEME_EC) ||
|
||||||
pool_item.second["pg_size"].uint64_value() > 256)
|
// limit is 64 because osd_peering_pg.cpp uses a 64-bit mask for has_roles
|
||||||
|
pool_item.second["pg_size"].uint64_value() > 64)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Pool %u has invalid pg_size, skipping pool\n", pool_id);
|
fprintf(stderr, "Pool %u has invalid pg_size, skipping pool\n", pool_id);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -159,9 +159,9 @@ void pg_obj_state_check_t::handle_version()
|
|||||||
{
|
{
|
||||||
n_mismatched++;
|
n_mismatched++;
|
||||||
}
|
}
|
||||||
if (!(has_roles & (1 << replica)))
|
if (!(has_roles & ((uint64_t)1 << replica)))
|
||||||
{
|
{
|
||||||
has_roles = has_roles | (1 << replica);
|
has_roles = has_roles | ((uint64_t)1 << replica);
|
||||||
n_roles++;
|
n_roles++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user