summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-06-10 15:43:20 -0700
committerSamuel Just <sam.just@inktank.com>2013-06-17 14:50:53 -0700
commitf35bc0259100c07aa8dcc8c882b0d69ed6a48648 (patch)
tree0dea844ab0cf6e8369452c1327a5c21465b2f268
parentd77c4ffa5354e83328c7079ee4b4b63aec8011a3 (diff)
downloadceph-f35bc0259100c07aa8dcc8c882b0d69ed6a48648.tar.gz
PG: move instances of log dirtying in PG into PGLog
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/PG.cc5
-rw-r--r--src/osd/PGLog.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 0b8c21538d0..6742320b749 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -1753,10 +1753,8 @@ void PG::split_into(pg_t child_pgid, PG *child, unsigned split_bits)
child->dirty_info = true;
child->dirty_big_info = true;
- child->dirty_log = true;
dirty_info = true;
dirty_big_info = true;
- dirty_log = true;
}
void PG::clear_recovery_state()
@@ -2011,7 +2009,6 @@ void PG::init(int role, vector<int>& newup, vector<int>& newacting,
dirty_info = true;
dirty_big_info = true;
- dirty_log = true;
write_if_dirty(*t);
}
@@ -2248,7 +2245,6 @@ epoch_t PG::peek_map_epoch(ObjectStore *store, coll_t coll, hobject_t &infos_oid
void PG::write_log(ObjectStore::Transaction& t)
{
pg_log.write_log(t, log_oid);
- dirty_log = false;
}
void PG::write_if_dirty(ObjectStore::Transaction& t)
@@ -6198,7 +6194,6 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MLogRec& logevt)
pg->reg_next_scrub();
pg->dirty_info = true;
pg->dirty_big_info = true; // maybe.
- pg->dirty_log = true;
pg->pg_log.claim_log(msg->log);
pg->pg_log.reset_backfill();
} else {
diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h
index 9cf88c29c64..7dd16743e5b 100644
--- a/src/osd/PGLog.h
+++ b/src/osd/PGLog.h
@@ -259,6 +259,7 @@ public:
void claim_log(const pg_log_t &o) {
log.claim_log(o);
missing.clear();
+ mark_dirty_to(eversion_t::max());
}
void split_into(
@@ -267,6 +268,8 @@ public:
PGLog *opg_log) {
log.split_into(child_pgid, split_bits, &(opg_log->log));
missing.split_into(child_pgid, split_bits, &(opg_log->missing));
+ opg_log->mark_dirty_to(eversion_t::max());
+ mark_dirty_to(eversion_t::max());
}
void recover_got(hobject_t oid, eversion_t v, pg_info_t &info) {