From c76838f6681d0312a273bc05078ca88a5d94ad5b Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 14 May 2013 17:12:10 -0700 Subject: [PATCH] osd: Style corrections Signed-off-by: David Zafman --- src/osd/OSD.cc | 3 ++- src/osd/PG.cc | 28 +++++++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index ef2b58a5de220..cefff55a778cf 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2970,7 +2970,8 @@ bool remove_dir( ObjectStore *store, SnapMapper *mapper, OSDriver *osdriver, ObjectStore::Sequencer *osr, - coll_t coll, DeletingStateRef dstate) { + coll_t coll, DeletingStateRef dstate) +{ vector olist; int64_t num = 0; ObjectStore::Transaction *t = new ObjectStore::Transaction; diff --git a/src/osd/PG.cc b/src/osd/PG.cc index cb13bdc850097..8faa75e968b49 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -45,7 +45,8 @@ static ostream& _prefix(std::ostream *_dout, const PG *pg) return *_dout << pg->gen_prefix(); } -void PG::get(const string &tag) { +void PG::get(const string &tag) +{ ref.inc(); #ifdef PG_DEBUG_REFS Mutex::Locker l(_ref_id_lock); @@ -55,7 +56,9 @@ void PG::get(const string &tag) { _tag_counts[tag]++; #endif } -void PG::put(const string &tag) { + +void PG::put(const string &tag) +{ #ifdef PG_DEBUG_REFS { Mutex::Locker l(_ref_id_lock); @@ -71,7 +74,8 @@ void PG::put(const string &tag) { } #ifdef PG_DEBUG_REFS -uint64_t PG::get_with_id() { +uint64_t PG::get_with_id() +{ ref.inc(); Mutex::Locker l(_ref_id_lock); uint64_t id = ++_ref_id; @@ -84,7 +88,8 @@ uint64_t PG::get_with_id() { return id; } -void PG::put_with_id(uint64_t id) { +void PG::put_with_id(uint64_t id) +{ dout(20) << __func__ << ": " << info.pgid << " put id " << id << dendl; { Mutex::Locker l(_ref_id_lock); @@ -95,7 +100,8 @@ void PG::put_with_id(uint64_t id) { delete this; } -void PG::dump_live_ids() { +void PG::dump_live_ids() +{ Mutex::Locker l(_ref_id_lock); dout(0) << "\t" << __func__ << ": " << info.pgid << " live ids:" << dendl; for (map::iterator i = _live_ids.begin(); @@ -4056,7 +4062,8 @@ void PG::_compare_scrubmaps(const map &maps, } } -void PG::scrub_compare_maps() { +void PG::scrub_compare_maps() +{ dout(10) << "scrub_compare_maps has maps, analyzing" << dendl; // construct authoritative scrub map for type specific scrubbing @@ -4114,7 +4121,8 @@ void PG::scrub_compare_maps() { _scrub(authmap); } -void PG::scrub_process_inconsistent() { +void PG::scrub_process_inconsistent() +{ dout(10) << "process_inconsistent() checking authoritative" << dendl; bool repair = state_test(PG_STATE_REPAIR); bool deep_scrub = state_test(PG_STATE_DEEP_SCRUB); @@ -4174,7 +4182,8 @@ void PG::scrub_process_inconsistent() { } } -void PG::scrub_finalize() { +void PG::scrub_finalize() +{ lock(); if (deleting) { unlock(); @@ -4206,7 +4215,8 @@ void PG::scrub_finalize() { } // the part that actually finalizes a scrub -void PG::scrub_finish() { +void PG::scrub_finish() +{ bool repair = state_test(PG_STATE_REPAIR); bool deep_scrub = state_test(PG_STATE_DEEP_SCRUB); const char *mode = (repair ? "repair": (deep_scrub ? "deep-scrub" : "scrub")); -- 2.39.5