From: Sage Weil Date: Tue, 2 Feb 2010 19:18:49 +0000 (-0800) Subject: journal: fix mis-merge X-Git-Tag: v0.20~431^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6963a6f697f34fc3d79b350454052f8c12de9da3;p=ceph.git journal: fix mis-merge --- diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index b75de1930be..73bc28d4e09 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -331,14 +331,6 @@ bool FileJournal::check_for_full(__u64 seq, off64_t pos, off64_t size) if (room >= size) { dout(10) << "check_for_full at " << pos << " : " << size << " < " << room << dendl; - - // wait? - if (wait_on_full) { - dout(1) << "check_for_full waiting for a commit" << dendl; - commit_cond.Wait(write_lock); - goto retry; - } - if (pos + size > header.max_size) must_write_header = true; return true; @@ -349,6 +341,14 @@ bool FileJournal::check_for_full(__u64 seq, off64_t pos, off64_t size) << pos << " >= " << room << " (max_size " << header.max_size << " start " << header.start << ")" << dendl; + + // wait? + if (wait_on_full) { + dout(1) << "check_for_full waiting for a commit" << dendl; + commit_cond.Wait(write_lock); + goto retry; + } + full_commit_seq = seq; full_restart_seq = seq+1; while (!writeq.empty()) {