]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: send bucket sync structs to bucket_sync.h
authorSeena Fallah <seenafallah@gmail.com>
Sat, 22 Feb 2025 23:47:55 +0000 (00:47 +0100)
committerCasey Bodley <cbodley@redhat.com>
Tue, 29 Apr 2025 14:22:46 +0000 (10:22 -0400)
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 <seenafallah@gmail.com>
(cherry picked from commit e7422956988394d334043123bc87460055a9db13)

src/rgw/driver/rados/rgw_bucket_sync.h
src/rgw/driver/rados/rgw_data_sync.h

index eb3226b704738d2b08f5ed38f7a7a1cb0d54f301..d41bb4f3ee128c3c76341bdf333b48754d26923e 100644 (file)
@@ -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<std::string, bufferlist> source_bucket_attrs;
+  RGWBucketInfo dest_bucket_info;
+  std::map<std::string, bufferlist> 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;
+}
index 9daf2b739bde3bf8a6aac17ecf80df5d06393dfb..e2ee56a0ef867fbf5b90c491b13311307fb70a8b 100644 (file)
@@ -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<std::string, bufferlist> source_bucket_attrs;
-  RGWBucketInfo dest_bucket_info;
-  std::map<std::string, bufferlist> 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;