Whamcloud - gitweb
LU-12295 mdd: don't LBUG() if dir nlink is wrong 34/39734/7
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 26 Aug 2020 14:47:14 +0000 (22:47 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:43:44 +0000 (15:43 +0000)
commitafa39b3cceabccd19e7c412ff90667e95cbfe3e8
treebb8e07ff2b68f5c88cdd6418c1cd65332dbaafcb
parentec94d6f77b61fe501c1ac8bb6256bd3caff23ad3
LU-12295 mdd: don't LBUG() if dir nlink is wrong

Sometimes dir nlink may not be correctly decreased: subdir is remote,
when it's unlinked, its dirent is removed, but parent nlink decrease
failed.

Don't assert this in osd_destroy(), but print an error message and
continue since we've checked directory is empty.

Add OBD_FAIL_OSD_REF_DEL to simulate the error above.

Add sanity 48f.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I483aaf7a62b7761868b5e2af8dbfa92929fda78c
Reviewed-on: https://review.whamcloud.com/39734
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/include/obd_support.h
lustre/osd-ldiskfs/osd_handler.c
lustre/tests/sanity.sh