Whamcloud - gitweb
LU-13453 osd-ldiskfs: do not leak inode if OI insertion fails
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 15 Apr 2020 14:54:07 +0000 (17:54 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 27 Oct 2023 21:41:52 +0000 (21:41 +0000)
commit501b0c82875df80f99c2235bd5a0519e032c42aa
tree7dab78c13230086eb4a726e618430eef6c147903
parent1ef6ce825c69bc788592b7c81be5fd6441509eb5
LU-13453 osd-ldiskfs: do not leak inode if OI insertion fails

osd_create() should destroy just created inode if OI insertion
fails.

also fixes lustre_index_restore() to drop nlink for object to
be removed.

the patch adds two tests:
 - ENOSPC on OI insertion
 - ENOSPC on .. insertion, i.e. directory block allocation

Lustre-change: https://review.whamcloud.com/38235
Lustre-commit: e45e8a92a2ecab742b3680716a55aaa1d9827057

Test-Parameters: testlist=sanity-scrub mdscount=2 mdtcount=4
Test-Parameters: testlist=sanity-scrub mdscount=2 mdtcount=4
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I2a5db657c7dab54b8dc2c50bc29365d5ee754a2e
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52846
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/scrub.c
lustre/osd-ldiskfs/osd_handler.c
lustre/tests/sanity-scrub.sh