From 852ead59d58fe97a0e6143aafe80334c3b7abbae Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Mon, 12 Oct 2015 11:08:13 +0200 Subject: [PATCH] rgw: fix whitespace and remove debug messages Signed-off-by: Orit Wasserman --- src/CMakeLists.txt | 3 +-- src/erasure-code/isa/CMakeLists.txt | 2 -- src/rgw/rgw_admin.cc | 16 ++++++++-------- src/rgw/rgw_json_enc.cc | 6 +++--- src/rgw/rgw_metadata.cc | 1 + src/rgw/rgw_rados.cc | 10 +++++----- src/rgw/rgw_rados.h | 8 ++++---- 7 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 792c63c1d6d7c..3cf5e730f4a47 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -550,8 +550,7 @@ if(${WITH_RADOSGW}) expat fcgi resolv - ) - + ) endif(${WITH_RADOSGW}) if(${WITH_RBD}) set(DENCODER_EXTRALIBS diff --git a/src/erasure-code/isa/CMakeLists.txt b/src/erasure-code/isa/CMakeLists.txt index f5758da2e9eab..923427441b7a7 100644 --- a/src/erasure-code/isa/CMakeLists.txt +++ b/src/erasure-code/isa/CMakeLists.txt @@ -2,8 +2,6 @@ include_directories(isa-l/include) -MESSAGE("file " $(CMAKE_SOURCE_DIR)/src/erasure-code/ErasureCode.cc) - set(isa_srcs isa-l/erasure_code/ec_base.c isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 474d4ebb8c597..fda454fdb8780 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2422,7 +2422,7 @@ int main(int argc, char **argv) try { decode_json_obj(zonegroupmap, &p); } catch (JSONDecoder::err& e) { - cout << "failed to decode: " << e.message << std::endl; + cout << "failed to decode: " << e.message << std::endl; RGWRegionMap region_map; try { decode_json_obj(region_map, &p); @@ -2431,12 +2431,12 @@ int main(int argc, char **argv) if (ret < 0) { cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl; return -ret; - } + } ret = zonegroupmap.update(realm); if (ret < 0) { cerr << "failed to update zonegroup_map: " << cpp_strerror(-ret) << std::endl; - } + } ret = zonegroupmap.update(g_ceph_context, store, realm.get_current_period(), realm.get_id()); if (ret < 0) { @@ -2550,14 +2550,14 @@ int main(int argc, char **argv) } realm_id = zonegroup.realm_id; } - + RGWRealm realm(realm_id, realm_name); ret = realm.init(g_ceph_context, store); if (ret < 0) { cerr << "ERROR: couldn't init realm:" << cpp_strerror(-ret) << std::endl; return ret; } - + RGWZoneGroupMap zonegroup_map; ret = zonegroup_map.read(g_ceph_context, store); if (ret < 0 && ret != -ENOENT) { @@ -2617,7 +2617,7 @@ int main(int argc, char **argv) << cpp_strerror(-ret) << std::endl; return ret; } - + RGWZoneGroupMap zonegroup_map; ret = zonegroup_map.read(g_ceph_context, store); if (ret < 0 && ret != -ENOENT) { @@ -2689,7 +2689,7 @@ int main(int argc, char **argv) } break; case OPT_ZONE_SET: - { + { RGWZoneParams zone(zone_name); int ret = zone.init(g_ceph_context, store, false); if (ret < 0) { @@ -2700,7 +2700,7 @@ int main(int argc, char **argv) if (ret < 0) { return 1; } - + if (zone.get_id().empty() && zone.get_name().empty()) { cerr << "no zone name id or name in the json provided , assuming old format" << std::endl; if (zone_name.empty()) { diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index b71022e462d26..2bc7371e82a83 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -836,7 +836,7 @@ void RGWZone::dump(Formatter *f) const void RGWZone::decode_json(JSONObj *obj) { - JSONDecoder::decode_json("id", id, obj); + JSONDecoder::decode_json("id", id, obj); JSONDecoder::decode_json("name", name, obj); if (id.empty()) { id = name; @@ -896,7 +896,7 @@ void RGWZoneGroup::decode_json(JSONObj *obj) derr << "old format " << dendl; JSONDecoder::decode_json("name", name, obj); id = name; - } + } JSONDecoder::decode_json("api_name", api_name, obj); JSONDecoder::decode_json("is_master", is_master, obj); JSONDecoder::decode_json("endpoints", endpoints, obj); @@ -967,7 +967,7 @@ void RGWZoneGroupMap::decode_json(JSONObj *obj) if (!JSONDecoder::decode_json("realms", realms, decode_realms, obj) ) { throw JSONDecoder::err("Old regionmap format"); } - JSONDecoder::decode_json("periods", periods, decode_periods, obj); + JSONDecoder::decode_json("periods", periods, decode_periods, obj); JSONDecoder::decode_json("bucket_quota", bucket_quota, obj); JSONDecoder::decode_json("user_quota", user_quota, obj); } diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index a75e44fb081b4..41fef021a6a7e 100644 --- a/src/rgw/rgw_metadata.cc +++ b/src/rgw/rgw_metadata.cc @@ -787,3 +787,4 @@ int RGWMetadataManager::remove_entry(RGWMetadataHandler *handler, string& key, R return 0; } + diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 3c376357f68bc..00cfc348c2907 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -528,7 +528,7 @@ int RGWSystemMetaObj::create() new_uuid.print(uuid_str); id = uuid_str; } - + ret = store_info(true); if (ret < 0) { ldout(cct, 0) << "ERROR: storing info for " << id << ": " << cpp_strerror(-ret) << dendl; @@ -654,7 +654,7 @@ int RGWPeriod::init(CephContext *_cct, RGWRados *_store, bool setup_obj) return ret; } id = realm.get_current_period(); - realm_id = realm.get_id(); + realm_id = realm.get_id(); } if (!epoch) { @@ -2960,9 +2960,9 @@ int RGWRados::init_complete() } } } else { - RGWZoneGroup master_zonegroup; + RGWZoneGroup master_zonegroup; for (map::iterator iter = zonegroup_map.realms.begin(); iter != zonegroup_map.realms.end(); - iter++) { + iter++) { if (master_zonegroup.get_id().empty()) { ret = zonegroup_map.get_master_zonegroup(iter->second.get_current_period(), master_zonegroup); if (ret < 0 && ret != -ENOENT) { @@ -2976,7 +2976,7 @@ int RGWRados::init_complete() ldout(cct, 0) << "ERROR: failed to read zonegroups" << dendl; return ret; } - + for ( map::iterator iter = zonegroups.begin(); iter != zonegroups.end(); ++iter) { RGWZoneGroup& zonegroup = iter->second; add_new_connection_to_map(zonegroup_conn_map, zonegroup, new RGWRESTConn(cct, this, zonegroup.endpoints)); diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 656cca3b2047a..c6350b33de8e0 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -1202,7 +1202,7 @@ struct RGWZoneGroupMap { int update(RGWRealm& realm); int update(CephContext *cct, RGWRados *store, const string& period_id, - const string& realm_id); + const string& realm_id); int update_master_zonegroup(const string& period_id, const string& master_zonegroup); @@ -1266,7 +1266,7 @@ class RGWRealm : public RGWSystemMetaObj public: RGWRealm() {} - RGWRealm(const string& _id, const string& _name = "") : RGWSystemMetaObj(_id, _name) {} + RGWRealm(const string& _id, const string& _name = "") : RGWSystemMetaObj(_id, _name) {} RGWRealm(CephContext *_cct, RGWRados *_store): RGWSystemMetaObj(_cct, _store) {} RGWRealm(const string& _name, CephContext *_cct, RGWRados *_store): RGWSystemMetaObj(_name, _cct, _store){} @@ -1351,7 +1351,7 @@ class RGWPeriod public: RGWPeriod() {}; - + RGWPeriod(const string& period_id, epoch_t _epoch = 0) : id(period_id), epoch(_epoch) {} @@ -1378,7 +1378,7 @@ public: bool setup_obj = true); int init(CephContext *_cct, RGWRados *_store, bool setup_obj = true); int use_next_epoch(); - + int create(); int delete_obj(); int store_info(bool exclusive); -- 2.39.5