]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: nfs-ganesha with cephfs client, removing dir reports not empty 33292/head
authorPeng Xie <peng.hse@xtaotech.com>
Fri, 12 Jul 2019 08:31:58 +0000 (16:31 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 14 Feb 2020 04:34:08 +0000 (20:34 -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>
(cherry picked from commit 2cce2d4c7d5f3a274c206b4090057760f357ecb0)

src/client/Client.cc

index 35ea7100eae8388b52552a57a328c379e3ea4980..49c15f942818a31cbdaeb3f1e3d3d703ebb414b2 100644 (file)
@@ -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);