]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: don't choose dirfrag when opendir
authorYan, Zheng <zyan@redhat.com>
Wed, 14 Oct 2015 13:03:05 +0000 (21:03 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 2 Dec 2015 03:49:15 +0000 (11:49 +0800)
When the directory is fragmented, choosing dirfrag makes dir_result_t::offset
non-zero. This results missing '.' and '..' in readdir result.

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

index 3c1acf9c94d65b09a399ee8ebf7ca297e2ffd864..0c7dde628076244082263f882e5324a3e581b8d5 100644 (file)
@@ -6256,7 +6256,6 @@ int Client::_opendir(Inode *in, dir_result_t **dirpp, int uid, int gid)
   if (!in->is_dir())
     return -ENOTDIR;
   *dirpp = new dir_result_t(in);
-  (*dirpp)->set_frag(in->dirfragtree[0]);
   if (in->dir) {
     (*dirpp)->release_count = in->dir->release_count;
     (*dirpp)->ordered_count = in->dir->ordered_count;