Whamcloud - gitweb
LU-10131 llite: Update i_nlink on unlink 51/29651/4
authorPatrick Farrell <paf@cray.com>
Wed, 18 Oct 2017 10:24:41 +0000 (05:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 25 Oct 2017 00:54:35 +0000 (00:54 +0000)
commit947b22b08d3725852a811a9e330562dd986d7336
treeea86281f7739f3fcf1d254993f5186954bab77d7
parent1b609396e468949f2420f14fed5ebfc999366b62
LU-10131 llite: Update i_nlink on unlink

Currently, the client inode link count is not updated on
last unlink.  This is fine because the dentries are all
gone and the inode is eligible for reclaim, but it's still
incorrect.  This causes two problems:

1. Inode is not immediately reclaimed
2. i_nlink count is > 0 for a fully unlinked file, which
confuses wrapfs

On last unlink, the MDT sends back attributes.  Use the
nlink count from these to update the client inode.

Remove null check inherited from ll_get_child_fid, because
the inode should never be null on an unlink.

Re-enabled test 76, which passes with this patch.
Removed slab allocator tuning from test_76, because slab is
no longer the default Linux allocator.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ib253b5cf3d35188554cf8fc33a8a3d4b8bb237e8
Reviewed-on: https://review.whamcloud.com/29651
Tested-by: Jenkins
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/namei.c
lustre/tests/sanity.sh