rgw:adding bucket index Indexless check when bi list

fixes:https://tracker.ceph.com/issues/73861

Signed-off-by: lizhipeng <qiuxinyidian@gmail.com>
Co-authored-by: lizhipeng <lizhipeng@kylinos.cn>
This commit is contained in:
lizhipeng 2026-06-17 00:31:05 -04:00
parent 2286265c0a
commit aed96f7a2f

View File

@ -8627,6 +8627,11 @@ next:
std::list<rgw_cls_bi_entry> entries;
bool is_truncated;
const auto& index = bucket->get_info().layout.current_index;
if (index.layout.type == rgw::BucketIndexType::Indexless) {
cerr << "Error: indexless bucket has no index to list" << std::endl;
return EINVAL;
}
const int max_shards = rgw::num_shards(index);
if (max_entries < 0) {
max_entries = 1000;