]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: improve error handling in PurgeQueue 22580/head
authorJohn Spray <john.spray@redhat.com>
Fri, 15 Jun 2018 15:39:02 +0000 (16:39 +0100)
committerJohn Spray <john.spray@redhat.com>
Fri, 15 Jun 2018 15:44:38 +0000 (16:44 +0100)
Fixes: http://tracker.ceph.com/issues/24533
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/PurgeQueue.cc

index 097e473dcd8f6e7921ddd16fa8ad946db5c051ac..f254a6b77e3be9fb941f4408f41295c59bad38ce 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);
           }
         }));
       }