]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Client: unlink dentry for inode with llref=0 29321/head
authorXiaoxi CHEN <xiaoxchen@ebay.com>
Thu, 25 Jul 2019 14:10:20 +0000 (07:10 -0700)
committerXiaoxi CHEN <xiaoxchen@ebay.com>
Fri, 26 Jul 2019 02:32:53 +0000 (19:32 -0700)
commitc9ff6ab4ebc0d44a07610f3391dfb92366f0277b
tree912f9c2260d793886b6de170c09ed1d4fd128e9f
parenta29700e5e7b518d1fb3099dec464010cf57a4580
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>
src/client/Client.cc