From 8a80652f3d818f75980731180dd22408c2018b92 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 14 Oct 2015 21:03:05 +0800 Subject: [PATCH] client: don't choose dirfrag when opendir 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 --- src/client/Client.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 3c1acf9c94d65..0c7dde6280762 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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; -- 2.39.5