]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Handle blacklisted error in purge queue
authorVarsha Rao <varao@redhat.com>
Fri, 28 Feb 2020 06:43:31 +0000 (12:13 +0530)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 20 May 2020 08:27:12 +0000 (08:27 +0000)
This patch adds check to catch blacklisted error from filer. On catching this
error, mds will respawn.

Fixes: https://tracker.ceph.com/issues/43598
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit c144d66afa74e8e45a2fc96bb650219d001538bf)

src/mds/PurgeQueue.cc

index 7cabc25f2b811df432fa237b7a6394909b4a7ad7..f730e4b076050e1925343998a195a651e5f51096 100644 (file)
@@ -584,8 +584,14 @@ void PurgeQueue::_execute_item(
   gather.set_finisher(new C_OnFinisher(
                       new FunctionContext([this, expire_to](int r){
     std::lock_guard l(lock);
-    _execute_item_complete(expire_to);
 
+    if (r == -EBLACKLISTED) {
+      finisher.queue(on_error, r);
+      on_error = nullptr;
+      return;
+    }
+
+    _execute_item_complete(expire_to);
     _consume();
 
     // Have we gone idle?  If so, do an extra write_head now instead of