]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix Client::choose_target_mds()
authorYan, Zheng <zyan@redhat.com>
Thu, 21 Jul 2016 08:12:07 +0000 (16:12 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 22 Jul 2016 02:24:41 +0000 (10:24 +0800)
dirfrag's auth mds is recorded in CInode::fragmap

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

index a47cd58cdf92c120f799d5ed3b0fec76ad272f36..8a9dc974f2437e61a787380ae2f5ea051f4e2061 100644 (file)
@@ -1441,7 +1441,7 @@ mds_rank_t Client::choose_target_mds(MetaRequest *req)
     ldout(cct, 20) << "choose_target_mds " << *in << " is_hash=" << is_hash
              << " hash=" << hash << dendl;
   
-    if (is_hash && S_ISDIR(in->mode) && !in->dirfragtree.empty()) {
+    if (is_hash && S_ISDIR(in->mode) && !in->fragmap.empty()) {
       frag_t fg = in->dirfragtree[hash];
       if (in->fragmap.count(fg)) {
         mds = in->fragmap[fg];