Skip to content

Commit

Permalink
rgw: is_single_zonegroup doesn't use store or cct
Browse files Browse the repository at this point in the history
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit 0b0090c)
  • Loading branch information
oritwas authored and smithfarm committed Sep 12, 2017
1 parent 3eb913e commit 63df578
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/rgw/rgw_rados.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

Expand Down Expand Up @@ -915,11 +916,6 @@ int RGWPeriod::get_zonegroup(RGWZoneGroup& zonegroup, const string& zonegroup_id
return -ENOENT;
}

bool RGWPeriod::is_single_zonegroup(CephContext *cct, RGWRados *store)
{
return (period_map.zonegroups.size() == 1);
}

const string& RGWPeriod::get_latest_epoch_oid()
{
if (cct->_conf->rgw_period_latest_epoch_info_oid.empty()) {
Expand Down Expand Up @@ -7389,7 +7385,7 @@ bool RGWRados::is_syncing_bucket_meta(rgw_bucket& bucket)
}

/* single zonegroup and a single zone */
if (current_period.is_single_zonegroup(cct, this) && get_zonegroup().zones.size() == 1) {
if (current_period.is_single_zonegroup() && get_zonegroup().zones.size() == 1) {
return false;
}

Expand Down
5 changes: 4 additions & 1 deletion src/rgw/rgw_rados.h
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,10 @@ class RGWPeriod
int get_zonegroup(RGWZoneGroup& zonegroup,
const string& zonegroup_id);

bool is_single_zonegroup(CephContext *cct, RGWRados *store);
bool is_single_zonegroup()
{
return (period_map.zonegroups.size() == 1);
}

/*
returns true if there are several zone groups with a least one zone
Expand Down

0 comments on commit 63df578

Please sign in to comment.