]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/services/svc_zone.cc
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / rgw / services / svc_zone.cc
index 3f810d7acd24510ddf008d2e4dbe919115522eeb..180d9371222bf490934d6daed12c7d3ab12cd2ff 100644 (file)
@@ -65,6 +65,21 @@ bool RGWSI_Zone::zone_syncs_from(const RGWZone& target_zone, const RGWZone& sour
          sync_modules_svc->get_manager()->supports_data_export(source_zone.tier_type);
 }
 
+bool RGWSI_Zone::zone_syncs_from(const RGWZone& source_zone) const
+{
+  auto target_zone = get_zone();
+  bool found = false;
+
+  for (auto s : data_sync_source_zones) {
+    if (s->id == source_zone.id) {
+      found = true;
+      break;
+    }
+  }
+  return found && target_zone.syncs_from(source_zone.name) &&
+         sync_modules_svc->get_manager()->supports_data_export(source_zone.tier_type);
+}
+
 int RGWSI_Zone::search_realm_with_zone(const DoutPrefixProvider *dpp,
                                        const rgw_zone_id& zid,
                                        RGWRealm *prealm,