Whamcloud - gitweb
LU-13909 llite: prune invalid dentries 85/39685/2
authorLai Siyao <lai.siyao@whamcloud.com>
Mon, 3 Aug 2020 18:21:58 +0000 (02:21 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Sep 2020 18:08:58 +0000 (18:08 +0000)
commit1f0b2a0dca6a3296791584770bb0062d1b969c51
tree5ece6acac6e7a97b9ab4d75a16bae778915fab1b
parent29d4d4095a98fb5272112c6128f017dd228d96c2
LU-13909 llite: prune invalid dentries

When file LOOKUP lock is canceled on client, mark its dentries
invalid, and also prune them to avoid OOM, to achieve this,
ll_invalidate_aliases() is renamed to ll_prune_aliases(), the latter
calls d_prune_aliases() to prune unused invalid dentries.

The same for negative dentries when parent UPDATE lock is canceled,
rename ll_invalidate_negative_children() to
ll_prune_negative_children().

Since now unused invalid dentries will always be pruned, it's not
necessary to call __d_drop() in d_lustre_invalidate().

It's redundant to take i_lock before d_lustre_invalidate() in
ll_inode_revalidate() because d_lustre_invalidate() takes d_lock,
remove it.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ib0ae57537e31ba9269e042b94bc5fbe7cb263a50
Reviewed-on: https://review.whamcloud.com/39685
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
lustre/llite/dcache.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/namei.c