]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: delay moving overflowed buffers until quiesced
authorJason Dillaman <dillaman@redhat.com>
Thu, 29 Sep 2016 12:36:53 +0000 (08:36 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 11 Oct 2016 17:57:13 +0000 (13:57 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4483531aa3aa3d0f298778062e2b9a339ad05075)

src/journal/ObjectRecorder.cc
src/journal/ObjectRecorder.h

index f329c1fbed7093e2375f939820b32f006ffb3fd0..e4fe777e263bd69b85d8cab06ce13677cdf4c179 100644 (file)
@@ -254,7 +254,6 @@ void ObjectRecorder::handle_append_flushed(uint64_t tid, int r) {
     if (r == -EOVERFLOW || m_overflowed) {
       if (iter != m_in_flight_appends.end()) {
         m_overflowed = true;
-        append_overflowed(tid);
       } else {
         // must have seen an overflow on a previous append op
         assert(r == -EOVERFLOW && m_overflowed);
@@ -262,6 +261,7 @@ void ObjectRecorder::handle_append_flushed(uint64_t tid, int r) {
 
       // notify of overflow once all in-flight ops are complete
       if (m_in_flight_tids.empty() && !m_aio_scheduled) {
+        append_overflowed();
         notify_handler();
       }
       return;
@@ -293,13 +293,12 @@ void ObjectRecorder::handle_append_flushed(uint64_t tid, int r) {
   m_in_flight_flushes_cond.Signal();
 }
 
-void ObjectRecorder::append_overflowed(uint64_t tid) {
+void ObjectRecorder::append_overflowed() {
   ldout(m_cct, 10) << __func__ << ": " << m_oid << " append overflowed"
                    << dendl;
 
   assert(m_lock->is_locked());
   assert(!m_in_flight_appends.empty());
-  assert(m_in_flight_appends.begin()->first == tid);
 
   cancel_append_task();
 
index 9b285f8190880fc16889a163b9a9b50c366236cf..ec1eb3647d0491b95166bfd7fae16987f171da50 100644 (file)
@@ -160,7 +160,7 @@ private:
   bool append(const AppendBuffer &append_buffer, bool *schedule_append);
   bool flush_appends(bool force);
   void handle_append_flushed(uint64_t tid, int r);
-  void append_overflowed(uint64_t tid);
+  void append_overflowed();
   void send_appends(AppendBuffers *append_buffers);
   void send_appends_aio();