]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: nfs-ganesha with cephfs client, removing dir reports not empty 29005/head
authorPeng Xie <peng.hse@xtaotech.com>
Fri, 12 Jul 2019 08:31:58 +0000 (16:31 +0800)
committerPeng Xie <peng.hse@xtaotech.com>
Mon, 29 Jul 2019 10:09:55 +0000 (18:09 +0800)
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 <peng.hse@xtaotech.com>
src/client/Client.cc

index a1b2bfee15f2ee1181d24205d0c6134a216824d4..ea942a10018ff839c948108559352cdf2e9113fd 100644 (file)
@@ -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);