From: Sage Weil Date: Wed, 1 Dec 2010 21:48:56 +0000 (-0800) Subject: filestore: call lower-level do_transactions() during journal replay X-Git-Tag: v0.24~78 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a3d8c5279457927c959a40d1bb969bed80414f61;p=ceph.git 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 --- 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();