]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDS: Use new C_Gather::get_num_remaining() in MDCache.
authorGreg Farnum <gregf@hq.newdream.net>
Sat, 15 Jan 2011 00:22:11 +0000 (16:22 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Sat, 15 Jan 2011 00:22:11 +0000 (16:22 -0800)
It was using get_num(), which now reports the number created.
This probably wouldn't have worked previously except that
~C_Gather::C_GatherSub was inappropriately calling rm_sub().

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
src/include/Context.h
src/mds/MDCache.cc

index 80202b92238376ba1bf17d8d82fc0f300858f431..4609b5a41e5db9de729d3f932e79003d273d0ab4 100644 (file)
@@ -221,6 +221,7 @@ public:
 
   bool empty() { Mutex::Locker l(lock); return sub_existing_count == 0; }
   int get_num() { Mutex::Locker l(lock); return sub_created_count; }
+  int get_num_remaining() { Mutex::Locker l(lock); return sub_existing_count;}
 
   void finish(int r) {
     assert(0);    // nobody should ever call me.
index 83968e18d227d17670d2cda20e44f0a5ff5e485b..7a66928eafd5fa5cf439ceea78cd70f9b4f128a0 100644 (file)
@@ -4405,8 +4405,8 @@ void MDCache::open_snap_parents()
 
   send_snaps(splits);
 
-  if (gather->get_num()) {
-    dout(10) << "open_snap_parents - waiting for " << gather->get_num() << dendl;
+  if (gather->get_num_remaining()) {
+    dout(10) << "open_snap_parents - waiting for " << gather->get_num_remaining() << dendl;
     gather->set_finisher(new C_MDC_OpenSnapParents(this));
   } else {
     assert(missing_snap_parents.empty());