summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_bucket_layout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/rgw_bucket_layout.h')
-rw-r--r--src/rgw/rgw_bucket_layout.h9
1 files changed, 9 insertions, 0 deletions
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