summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-04-09 14:18:51 -0700
committerSamuel Just <sam.just@inktank.com>2013-04-10 12:47:23 -0700
commit13474b089b4ba702a37b6ca3483eddd6fc72b8f2 (patch)
treecf9287ed5a36729ad08d5d008c720a3a455ac618
parenta48739d9ab69b8372723139f652717709910e4d2 (diff)
downloadceph-13474b089b4ba702a37b6ca3483eddd6fc72b8f2.tar.gz
Journal: pass the sequence number to commit_start
A subsequent patch will need to see the committing seq. Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/os/FileJournal.cc2
-rw-r--r--src/os/FileJournal.h2
-rw-r--r--src/os/Journal.h2
-rw-r--r--src/os/JournalingObjectStore.cc5
4 files changed, 6 insertions, 5 deletions
diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc
index 29139c12bca..8986490e600 100644
--- a/src/os/FileJournal.cc
+++ b/src/os/FileJournal.cc
@@ -1480,7 +1480,7 @@ void FileJournal::pop_write()
writeq.pop_front();
}
-void FileJournal::commit_start()
+void FileJournal::commit_start(uint64_t seq)
{
dout(10) << "commit_start" << dendl;
diff --git a/src/os/FileJournal.h b/src/os/FileJournal.h
index 0e826fb4940..38e32324dca 100644
--- a/src/os/FileJournal.h
+++ b/src/os/FileJournal.h
@@ -403,7 +403,7 @@ private:
void make_writeable();
// writes
- void commit_start();
+ void commit_start(uint64_t seq);
void committed_thru(uint64_t seq);
bool should_commit_now() {
return full_state != FULL_NOTFULL;
diff --git a/src/os/Journal.h b/src/os/Journal.h
index 8241edc783d..1d413bb4c53 100644
--- a/src/os/Journal.h
+++ b/src/os/Journal.h
@@ -60,7 +60,7 @@ public:
virtual void submit_entry(uint64_t seq, bufferlist& e, int alignment,
Context *oncommit,
TrackedOpRef osd_op = TrackedOpRef()) = 0;
- virtual void commit_start() = 0;
+ virtual void commit_start(uint64_t seq) = 0;
virtual void committed_thru(uint64_t seq) = 0;
/// Read next journal entry - asserts on invalid journal
diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc
index e65f010443f..e662580ac42 100644
--- a/src/os/JournalingObjectStore.cc
+++ b/src/os/JournalingObjectStore.cc
@@ -177,6 +177,7 @@ bool JournalingObjectStore::ApplyManager::commit_start()
{
bool ret = false;
+ uint64_t _committing_seq = 0;
{
Mutex::Locker l(apply_lock);
dout(10) << "commit_start max_applied_seq " << max_applied_seq
@@ -198,7 +199,7 @@ bool JournalingObjectStore::ApplyManager::commit_start()
goto out;
}
- committing_seq = max_applied_seq;
+ _committing_seq = committing_seq = max_applied_seq;
dout(10) << "commit_start committing " << committing_seq
<< ", still blocked" << dendl;
@@ -208,7 +209,7 @@ bool JournalingObjectStore::ApplyManager::commit_start()
out:
if (journal)
- journal->commit_start(); // tell the journal too
+ journal->commit_start(_committing_seq); // tell the journal too
return ret;
}