]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Client: unlink dentry for inode with llref=0 29830/head
authorXiaoxi CHEN <xiaoxchen@ebay.com>
Thu, 25 Jul 2019 14:10:20 +0000 (07:10 -0700)
committerYan, Zheng <zyan@redhat.com>
Fri, 23 Aug 2019 00:56:10 +0000 (08:56 +0800)
commit798ee5d64d84ba747b4914cd48a6aae24bb20f97
tree159f5a72d2d730793908ecae7df0d8ffa34fff0f
parentb32ca7ca30c954e366c800b2f67bfc0968ad18be
Client: unlink dentry for inode with llref=0

when client get notification from MDS that a file has been deleted(via
getting CEPH_CAP_LINK_SHARED cap for inode with nlink = 0), if the client
hasnt touch the inode in the past, the ll_ref will be zero.

In previous code, we only call Client::unlink when ll_ref > 0, which is wrong
and will leave the dn in cache, keeping the caps and resulting the inode stays
in stray till the dn cache is dropped by kernel.

Under certain workload(write intensive and rotate intensive), this issue can cause
stray stacking to 100k+ and causeing huge space "leaking".

Fixes: http://tracker.ceph.com/issues/40960
Signed-off-by: Xiaoxi CHEN <xiaoxchen@ebay.com>
(cherry picked from commit c9ff6ab4ebc0d44a07610f3391dfb92366f0277b)

 Conflicts:
src/client/Client.cc
src/client/Client.cc