From a3d8c5279457927c959a40d1bb969bed80414f61 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 1 Dec 2010 13:48:56 -0800 Subject: [PATCH] filestore: call lower-level do_transactions() during journal replay We used to call apply_transactions, which avoided rejournaling anything because the journal wasn't writeable yet, but that uses all kinds of other machinery that relies on threads and finishers and such that aren't appropriate or necessary when we're just replaying journaled events. Instead, call the lower-level do_transactions() directly. Signed-off-by: Sage Weil --- src/os/JournalingObjectStore.cc | 3 ++- src/os/JournalingObjectStore.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index 6480c74104100..60165a189cabe 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -68,7 +68,8 @@ int JournalingObjectStore::journal_replay(uint64_t fs_op_seq) Transaction *t = new Transaction(p); tls.push_back(t); } - int r = apply_transactions(tls); + int r = do_transactions(tls, op_seq); + op_seq++; while (!tls.empty()) { delete tls.front(); tls.pop_front(); diff --git a/src/os/JournalingObjectStore.h b/src/os/JournalingObjectStore.h index 6189a3fe1c184..530215191498d 100644 --- a/src/os/JournalingObjectStore.h +++ b/src/os/JournalingObjectStore.h @@ -53,6 +53,8 @@ protected: void op_journal_transactions(list& tls, uint64_t op, Context *onjournal); void _op_journal_transactions(list& tls, uint64_t op, Context *onjournal); + virtual int do_transactions(list& tls, uint64_t op_seq) = 0; + bool commit_start(); void commit_started(); // allow new ops (underlying fs should now be committing all prior ops) void commit_finish(); -- 2.39.5