From 2e6532ac6913084a5c0242c54b4dd24533c23ef1 Mon Sep 17 00:00:00 2001 From: Seena Fallah Date: Sun, 23 Feb 2025 00:47:55 +0100 Subject: [PATCH] rgw: send bucket sync structs to bucket_sync.h So it can be imported by headers like rgw_cr_rados.h that already has dependency to rgw_data_sync.h. Signed-off-by: Seena Fallah (cherry picked from commit e7422956988394d334043123bc87460055a9db13) --- src/rgw/driver/rados/rgw_bucket_sync.h | 28 +++++++++++++++++++++++++ src/rgw/driver/rados/rgw_data_sync.h | 29 -------------------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/rgw/driver/rados/rgw_bucket_sync.h b/src/rgw/driver/rados/rgw_bucket_sync.h index eb3226b7047..d41bb4f3ee1 100644 --- a/src/rgw/driver/rados/rgw_bucket_sync.h +++ b/src/rgw/driver/rados/rgw_bucket_sync.h @@ -415,3 +415,31 @@ public: } }; +struct rgw_bucket_sync_pair_info { + RGWBucketSyncFlowManager::pipe_handler handler; /* responsible for sync filters */ + rgw_bucket_shard source_bs; + rgw_bucket dest_bucket; +}; + +inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pair_info& p) { + if (p.source_bs.bucket == p.dest_bucket) { + return out << p.source_bs; + } + return out << p.source_bs << "->" << p.dest_bucket; +} + +struct rgw_bucket_sync_pipe { + rgw_bucket_sync_pair_info info; + RGWBucketInfo source_bucket_info; + std::map source_bucket_attrs; + RGWBucketInfo dest_bucket_info; + std::map dest_bucket_attrs; + + RGWBucketSyncFlowManager::pipe_rules_ref& get_rules() { + return info.handler.rules; + } +}; + +inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pipe& p) { + return out << p.info; +} diff --git a/src/rgw/driver/rados/rgw_data_sync.h b/src/rgw/driver/rados/rgw_data_sync.h index 9daf2b739bd..e2ee56a0ef8 100644 --- a/src/rgw/driver/rados/rgw_data_sync.h +++ b/src/rgw/driver/rados/rgw_data_sync.h @@ -54,35 +54,6 @@ inline std::ostream& operator<<(std::ostream& out, const rgw_data_sync_obligatio class JSONObj; struct rgw_sync_bucket_pipe; -struct rgw_bucket_sync_pair_info { - RGWBucketSyncFlowManager::pipe_handler handler; /* responsible for sync filters */ - rgw_bucket_shard source_bs; - rgw_bucket dest_bucket; -}; - -inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pair_info& p) { - if (p.source_bs.bucket == p.dest_bucket) { - return out << p.source_bs; - } - return out << p.source_bs << "->" << p.dest_bucket; -} - -struct rgw_bucket_sync_pipe { - rgw_bucket_sync_pair_info info; - RGWBucketInfo source_bucket_info; - std::map source_bucket_attrs; - RGWBucketInfo dest_bucket_info; - std::map dest_bucket_attrs; - - RGWBucketSyncFlowManager::pipe_rules_ref& get_rules() { - return info.handler.rules; - } -}; - -inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pipe& p) { - return out << p.info; -} - struct rgw_datalog_info { uint32_t num_shards; -- 2.39.5