]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: correctly direct snapdir requests
authorSage Weil <sage@newdream.net>
Mon, 16 Aug 2010 18:22:45 +0000 (11:22 -0700)
committerSage Weil <sage@newdream.net>
Mon, 16 Aug 2010 21:51:25 +0000 (14:51 -0700)
Use real dir (and its caps), not the virtual snapdir.

src/client/Client.cc

index 9cd52a32d1e42c393bd77d8cd9e4dbc47a236e6b..3567465717eacb7637b1fff74db27fd5ea2e6922 100644 (file)
@@ -755,6 +755,10 @@ int Client::choose_target_mds(MetaRequest *req)
       is_hash = true;
     }
   }
+  if (dir_inode && dir_inode->snapid == CEPH_SNAPDIR) {
+    dir_inode = dir_inode->snapdir_parent;
+    is_hash = false;
+  }
   
   dout(20) << "choose_target_mds dir_inode" << dir_inode << " is_hash=" << is_hash
            << " hash=" << hash << dendl;