Whamcloud - gitweb
LU-10131 llite: Update i_nlink on unlink 85/29785/2
authorPatrick Farrell <paf@cray.com>
Wed, 18 Oct 2017 10:24:41 +0000 (05:24 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 26 Oct 2017 16:35:28 +0000 (16:35 +0000)
commit00fea22a18bf1bec71869be2fc5c661ed5d99b4d
tree21db5224544201d6db8d0a967a9b4bbb7ff1aa1a
parentdb0d3c621d1cb75961a8e8e158cda6daae0fdc3d
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.

Lustre-change: https://review.whamcloud.com/29651
Lustre-commit: 947b22b08d3725852a811a9e330562dd986d7336

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ib253b5cf3d35188554cf8fc33a8a3d4b8bb237e8
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29785
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/llite/namei.c
lustre/tests/sanity.sh