Fixes: http://tracker.ceph.com/issues/20546
Signed-off-by: Sage Weil <sage@redhat.com>
crush_bucket *b = crush->buckets[bidx];
if (b == 0)
continue;
+ const char *n = get_item_name(b->id);
+ if (n && !is_valid_crush_name(n))
+ continue;
for (unsigned i = 0; i < b->size; i++)
if (b->items[i] == id) {
string parent_id = name_map[b->id];
crush_bucket *b = crush->buckets[bidx];
if (b == 0)
continue;
+ const char *n = get_item_name(b->id);
+ if (n && !is_valid_crush_name(n))
+ continue;
for (unsigned i = 0; i < b->size; i++) {
if (b->items[i] == id) {
*parent = b->id;