Whamcloud - gitweb
LU-18860 mdd: fix CLF_UNLINK_LAST on open file unlink
The flag CLF_UNLINK_LAST should be set for UNLINK changelog if the
last link is removed.
This flag is not set if the file is open on a client.
If the file open, Lustre will re-link the file in the PENDING
MDT directory. So, la_nlink == 1 after mdd_finish_unlink() and
CLF_UNLINK_LAST will not be set.
Check if the object is dead instead of relying on la_nlink to set the
flag.
Update the sanity 161c for that use case.
Test-Parameters: testlist=sanity env=ONLY=161c,ONLY_REPEAT=20
Test-Parameters: testlist=sanity env=ONLY=161
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I35ef530cd55cd5e07ad79a7cdae056de95735f61
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58578
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>