summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-06-10 16:30:13 -0700
committerSamuel Just <sam.just@inktank.com>2013-06-17 14:50:53 -0700
commit6dd95c861955495e3a2f097e2e1069e3cf98343d (patch)
tree1f2c2ed8058c93d6ce989999f278dc62cd65aba8
parentb16fdf23e5325623874ee1a02e134f577c5a7dcd (diff)
downloadceph-6dd95c861955495e3a2f097e2e1069e3cf98343d.tar.gz
PG,PGLog: remove dirty_log arguments
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/PG.cc15
-rw-r--r--src/osd/PG.h4
-rw-r--r--src/osd/PGLog.cc12
-rw-r--r--src/osd/PGLog.h6
4 files changed, 14 insertions, 23 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 6742320b749..d1ebef06423 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -152,7 +152,7 @@ PG::PG(OSDService *o, OSDMapRef curmap,
#ifdef PG_DEBUG_REFS
_ref_id_lock("PG::_ref_id_lock"), _ref_id(0),
#endif
- deleting(false), dirty_info(false), dirty_big_info(false), dirty_log(false),
+ deleting(false), dirty_info(false), dirty_big_info(false),
info(p),
info_struct_v(0),
coll(p), log_oid(loid), biginfo_oid(ioid),
@@ -196,7 +196,6 @@ void PG::lock(bool no_lockdep)
// if we have unrecorded dirty state with the lock dropped, there is a bug
assert(!dirty_info);
assert(!dirty_big_info);
- assert(!dirty_log);
dout(30) << "lock" << dendl;
}
@@ -312,7 +311,7 @@ void PG::remove_snap_mapped_object(
void PG::merge_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog, int from)
{
list<hobject_t> to_remove;
- pg_log.merge_log(t, oinfo, olog, from, info, to_remove, dirty_log, dirty_info, dirty_big_info);
+ pg_log.merge_log(t, oinfo, olog, from, info, to_remove, dirty_info, dirty_big_info);
for(list<hobject_t>::iterator i = to_remove.begin();
i != to_remove.end();
++i)
@@ -322,7 +321,7 @@ void PG::merge_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog
void PG::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead)
{
list<hobject_t> to_remove;
- pg_log.rewind_divergent_log(t, newhead, info, to_remove, dirty_log, dirty_info, dirty_big_info);
+ pg_log.rewind_divergent_log(t, newhead, info, to_remove, dirty_info, dirty_big_info);
for(list<hobject_t>::iterator i = to_remove.begin();
i != to_remove.end();
++i)
@@ -2242,17 +2241,11 @@ epoch_t PG::peek_map_epoch(ObjectStore *store, coll_t coll, hobject_t &infos_oid
return cur_epoch;
}
-void PG::write_log(ObjectStore::Transaction& t)
-{
- pg_log.write_log(t, log_oid);
-}
-
void PG::write_if_dirty(ObjectStore::Transaction& t)
{
if (dirty_big_info || dirty_info)
write_info(t);
- if (dirty_log)
- write_log(t);
+ pg_log.write_log(t, log_oid);
}
void PG::trim_peers()
diff --git a/src/osd/PG.h b/src/osd/PG.h
index 107f76bd4d2..c4e113bb9e8 100644
--- a/src/osd/PG.h
+++ b/src/osd/PG.h
@@ -222,7 +222,6 @@ public:
//generic_dout(0) << this << " " << info.pgid << " unlock" << dendl;
assert(!dirty_info);
assert(!dirty_big_info);
- assert(!dirty_log);
_lock.Unlock();
}
@@ -249,7 +248,7 @@ public:
void get(const string &tag);
void put(const string &tag);
- bool dirty_info, dirty_big_info, dirty_log;
+ bool dirty_info, dirty_big_info;
public:
// pg state
@@ -1661,7 +1660,6 @@ public:
private:
void write_info(ObjectStore::Transaction& t);
- void write_log(ObjectStore::Transaction& t);
public:
static int _write_info(ObjectStore::Transaction& t, epoch_t epoch,
diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc
index c174221013a..5afa5c0aa47 100644
--- a/src/osd/PGLog.cc
+++ b/src/osd/PGLog.cc
@@ -264,7 +264,7 @@ void PGLog::proc_replica_log(ObjectStore::Transaction& t,
*
* return true if entry is not divergent.
*/
-bool PGLog::merge_old_entry(ObjectStore::Transaction& t, const pg_log_entry_t& oe, const pg_info_t& info, list<hobject_t>& remove_snap, bool &dirty_log)
+bool PGLog::merge_old_entry(ObjectStore::Transaction& t, const pg_log_entry_t& oe, const pg_info_t& info, list<hobject_t>& remove_snap)
{
if (oe.soid > info.last_backfill) {
dout(20) << "merge_old_entry had " << oe << " : beyond last_backfill" << dendl;
@@ -348,7 +348,7 @@ bool PGLog::merge_old_entry(ObjectStore::Transaction& t, const pg_log_entry_t& o
*/
void PGLog::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead,
pg_info_t &info, list<hobject_t>& remove_snap,
- bool &dirty_log, bool &dirty_info, bool &dirty_big_info)
+ bool &dirty_info, bool &dirty_big_info)
{
dout(10) << "rewind_divergent_log truncate divergent future " << newhead << dendl;
assert(newhead > log.tail);
@@ -379,7 +379,7 @@ void PGLog::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead
info.last_complete = newhead;
for (list<pg_log_entry_t>::iterator d = divergent.begin(); d != divergent.end(); ++d)
- merge_old_entry(t, *d, info, remove_snap, dirty_log);
+ merge_old_entry(t, *d, info, remove_snap);
dirty_info = true;
dirty_big_info = true;
@@ -388,7 +388,7 @@ void PGLog::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead
void PGLog::merge_log(ObjectStore::Transaction& t,
pg_info_t &oinfo, pg_log_t &olog, int fromosd,
pg_info_t &info, list<hobject_t>& remove_snap,
- bool &dirty_log, bool &dirty_info, bool &dirty_big_info)
+ bool &dirty_info, bool &dirty_big_info)
{
dout(10) << "merge_log " << olog << " from osd." << fromosd
<< " into " << log << dendl;
@@ -443,7 +443,7 @@ void PGLog::merge_log(ObjectStore::Transaction& t,
// do we have divergent entries to throw out?
if (olog.head < log.head) {
- rewind_divergent_log(t, olog.head, info, remove_snap, dirty_log, dirty_info, dirty_big_info);
+ rewind_divergent_log(t, olog.head, info, remove_snap, dirty_info, dirty_big_info);
changed = true;
}
@@ -512,7 +512,7 @@ void PGLog::merge_log(ObjectStore::Transaction& t,
// process divergent items
if (!divergent.empty()) {
for (list<pg_log_entry_t>::iterator d = divergent.begin(); d != divergent.end(); ++d)
- merge_old_entry(t, *d, info, remove_snap, dirty_log);
+ merge_old_entry(t, *d, info, remove_snap);
}
changed = true;
diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h
index 7dd16743e5b..8f48278041f 100644
--- a/src/osd/PGLog.h
+++ b/src/osd/PGLog.h
@@ -313,15 +313,15 @@ public:
protected:
bool merge_old_entry(ObjectStore::Transaction& t, const pg_log_entry_t& oe,
- const pg_info_t& info, list<hobject_t>& remove_snap, bool &dirty_log);
+ const pg_info_t& info, list<hobject_t>& remove_snap);
public:
void rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead,
pg_info_t &info, list<hobject_t>& remove_snap,
- bool &dirty_log, bool &dirty_info, bool &dirty_big_info);
+ bool &dirty_info, bool &dirty_big_info);
void merge_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog, int from,
pg_info_t &info, list<hobject_t>& remove_snap,
- bool &dirty_log, bool &dirty_info, bool &dirty_big_info);
+ bool &dirty_info, bool &dirty_big_info);
void write_log(ObjectStore::Transaction& t, const hobject_t &log_oid);