From: Peng Xie Date: Fri, 12 Jul 2019 08:31:58 +0000 (+0800) Subject: client: nfs-ganesha with cephfs client, removing dir reports not empty X-Git-Tag: v15.1.0~1564^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2cce2d4c7d5f3a274c206b4090057760f357ecb0;p=ceph.git 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index a1b2bfee15f2..ea942a10018f 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -8002,12 +8002,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);