From: Seena Fallah Date: Sat, 22 Feb 2025 23:47:55 +0000 (+0100) Subject: rgw: send bucket sync structs to bucket_sync.h X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2e6532ac6913084a5c0242c54b4dd24533c23ef1;p=ceph.git 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) --- diff --git a/src/rgw/driver/rados/rgw_bucket_sync.h b/src/rgw/driver/rados/rgw_bucket_sync.h index eb3226b704738..d41bb4f3ee128 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 9daf2b739bde3..e2ee56a0ef867 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;