From 17d6a993fc17d533460c5f40f3908c708e057c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 23 May 2024 18:45:17 +0200 Subject: Merging upstream version 18.2.3. Signed-off-by: Daniel Baumann --- src/rgw/rgw_bucket_layout.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rgw/rgw_bucket_layout.h') diff --git a/src/rgw/rgw_bucket_layout.h b/src/rgw/rgw_bucket_layout.h index 40aafd4dd..114f1f1ff 100644 --- a/src/rgw/rgw_bucket_layout.h +++ b/src/rgw/rgw_bucket_layout.h @@ -278,5 +278,14 @@ inline uint32_t current_num_shards(const BucketLayout& layout) { inline bool is_layout_indexless(const bucket_index_layout_generation& layout) { return layout.layout.type == BucketIndexType::Indexless; } +inline bool is_layout_reshardable(const bucket_index_layout_generation& layout) { + return layout.layout.type == BucketIndexType::Normal; +} +inline bool is_layout_reshardable(const BucketLayout& layout) { + return is_layout_reshardable(layout.current_index); +} +inline std::string_view current_layout_desc(const BucketLayout& layout) { + return rgw::to_string(layout.current_index.layout.type); +} } // namespace rgw -- cgit v1.2.3