From: Sage Weil Date: Wed, 27 Jan 2010 18:49:48 +0000 (-0800) Subject: filestore: queue onreadable _after_ starting journal item X-Git-Tag: v0.20~431^2~41 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4c1805294c05aa26e39f94b7f53248d883c3ef1;p=ceph.git filestore: queue onreadable _after_ starting journal item The onreadable is allowed to delete the Transaction --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 48872e097aa52..0c8b1ab8e3b10 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -630,7 +630,6 @@ int FileStore::queue_transactions(list &tls, dout(10) << "queue_transactions (trailing journal) " << op_seq << " " << tls << dendl; int r = do_transactions(tls, op_seq); op_apply_finish(); - op_finisher.queue(onreadable, r); if (r >= 0) { op_journal_start(op_seq); @@ -640,6 +639,11 @@ int FileStore::queue_transactions(list &tls, delete onjournal; delete ondisk; } + + // start on_readable finisher after we queue journal item, as on_readable callback + // is allowed to delete the Transaction + op_finisher.queue(onreadable, r); + return r; }