]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't query self from find_ino_peers
authorSage Weil <sage.weil@dreamhost.com>
Fri, 1 Apr 2011 17:49:02 +0000 (10:49 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 1 Apr 2011 18:24:14 +0000 (11:24 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/MDCache.cc

index 2d596768a078c3aa4b8c360b2e7aa582673244c6..6166c64b4bc4be9b9f5dc7f4d2128df2d05c8a6b 100644 (file)
@@ -6884,6 +6884,7 @@ void MDCache::find_ino_peers(inodeno_t ino, Context *c, int hint)
   fip.tid = tid;
   fip.fin = c;
   fip.hint = hint;
+  fip.checked.insert(mds->whoami);
   _do_find_ino_peer(fip);
 }
 
@@ -6904,7 +6905,8 @@ void MDCache::_do_find_ino_peer(find_ino_peer_info_t& fip)
     fip.hint = -1;
   } else {
     for (set<int>::iterator p = active.begin(); p != active.end(); p++)
-      if (fip.checked.count(*p) == 0) {
+      if (*p != mds->whoami &&
+         fip.checked.count(*p) == 0) {
        m = *p;
        break;
       }