]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: improve error handling in PurgeQueue 22811/head
authorJohn Spray <john.spray@redhat.com>
Fri, 15 Jun 2018 15:39:02 +0000 (16:39 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Jul 2018 10:16:27 +0000 (12:16 +0200)
Fixes: http://tracker.ceph.com/issues/24533
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit b0b7b84da84d69951977045e8812419c19268756)

src/mds/PurgeQueue.cc

index cec43ecd34704cc3972a5372712778d62b717203..afaf9b5f53d9fa3454f8aef212b18f8cb87af824 100644 (file)
@@ -359,6 +359,12 @@ bool PurgeQueue::_consume()
       delayed_flush = nullptr;
     }
 
+    if (int r = journaler.get_error()) {
+      derr << "Error " << r << " recovering write_pos" << dendl;
+      on_error->complete(r);
+      return could_consume;
+    }
+
     if (!journaler.is_readable()) {
       dout(10) << " not readable right now" << dendl;
       // Because we are the writer and the reader of the journal
@@ -368,6 +374,8 @@ bool PurgeQueue::_consume()
           Mutex::Locker l(lock);
           if (r == 0) {
             _consume();
+          } else if (r != -EAGAIN) {
+            on_error->complete(r);
           }
         }));
       }