]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix stack overflow caused by nested dispatch
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 26 Mar 2014 01:51:23 +0000 (09:51 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 28 Mar 2014 18:08:14 +0000 (02:08 +0800)
Commit bc3325b37 fixes a stack overflow bug happens when replaying
client requests. Similar stack overflow can happens when processing
finished contexts.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDS.cc

index 6b53c14c6f680b49c5c663058e61dbd7ebf50a9b..2473ff0eb1fdacb71266aa8fddd577e3bac70ad6 100644 (file)
@@ -1923,6 +1923,9 @@ bool MDS::_dispatch(Message *m)
     }
   }
 
+  if (dispatch_depth > 1)
+    return true;
+
   // finish any triggered contexts
   while (!finished_queue.empty()) {
     dout(7) << "mds has " << finished_queue.size() << " queued contexts" << dendl;
@@ -1940,9 +1943,6 @@ bool MDS::_dispatch(Message *m)
     }
   }
 
-  if (dispatch_depth > 1)
-    return true;
-
   while (!waiting_for_nolaggy.empty()) {
 
     // stop if we're laggy now!