From 3ab2282457c17ed076f3d2f6aae3170ddf4fa2a3 Mon Sep 17 00:00:00 2001 From: Peng Xie Date: Fri, 12 Jul 2019 16:31:58 +0800 Subject: [PATCH] client: nfs-ganesha with cephfs client, removing dir reports not empty the problem was due to the cephfs client side wrongly filled the directory offset from its readdir_cache to nfs-ganesha as its mdcache dirent cookie Fixes: http://tracker.ceph.com/issues/40746 Signed-off-by: Peng Xie (cherry picked from commit 2cce2d4c7d5f3a274c206b4090057760f357ecb0) --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 35ea7100eae83..49c15f942818a 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -7851,12 +7851,12 @@ int Client::_readdir_cache_cb(dir_result_t *dirp, add_dirent_cb_t cb, void *p, fill_statx(dn->inode, caps, &stx); uint64_t next_off = dn->offset + 1; + fill_dirent(&de, dn->name.c_str(), stx.stx_mode, stx.stx_ino, next_off); ++pd; if (pd == dir->readdir_cache.end()) next_off = dir_result_t::END; Inode *in = NULL; - fill_dirent(&de, dn->name.c_str(), stx.stx_mode, stx.stx_ino, next_off); if (getref) { in = dn->inode.get(); _ll_get(in); -- 2.39.5