]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: don't read reference to writeq head after pop_write
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 19 Apr 2012 22:22:53 +0000 (15:22 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Thu, 19 Apr 2012 22:22:53 +0000 (15:22 -0700)
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileJournal.cc

index 9316d0717d395dc5f62c915db806ba18e0923dbc..85f1c08ea69d412c557e7b9643f4f000ee5dcdab 100644 (file)
@@ -881,6 +881,8 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64
   }
   bl.append((const char*)&h, sizeof(h));
 
+  if (next_write.tracked_op)
+    next_write.tracked_op->mark_event("write_thread_in_journal_buffer");
   // pop from writeq
   pop_write();
   journalq.push_back(pair<uint64_t,off64_t>(seq, queue_pos));
@@ -890,8 +892,6 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64
   if (queue_pos > header.max_size)
     queue_pos = queue_pos + get_top() - header.max_size;
 
-  if (next_write.tracked_op)
-    next_write.tracked_op->mark_event("write_thread_in_journal_buffer");
   return 0;
 }