]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: queue non-recursive scrub to top of scrub stack
authorYan, Zheng <zyan@redhat.com>
Wed, 27 Jan 2016 10:38:27 +0000 (18:38 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 7 Mar 2016 07:59:13 +0000 (15:59 +0800)
non-recursive scrub blocks admin socket, make it have earliest service

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/MDCache.cc

index 9e670ff82c1acd742804720b570ecb6e73603588..ad0f6ac2c7f042cc26b1e098fecf0e39f8c300ca 100644 (file)
@@ -11754,11 +11754,11 @@ void MDCache::enqueue_scrub_work(MDRequestRef& mdr)
 
   // only set completion context for non-recursive scrub, because we don't 
   // want to block asok caller on long running scrub
-  Context *fin = NULL;
-  if (!header->recursive)
-    fin = cs->take_finisher();
-
-  mds->scrubstack->enqueue_inode_bottom(in, header, fin);
+  if (!header->recursive) {
+    Context *fin = cs->take_finisher();
+    mds->scrubstack->enqueue_inode_top(in, header, fin);
+  } else
+    mds->scrubstack->enqueue_inode_bottom(in, header, NULL);
 
   mds->server->respond_to_request(mdr, 0);
   return;