Whamcloud - gitweb
LU-13453 osd-ldiskfs: do not leak inode if OI insertion fails 35/38235/16
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 15 Apr 2020 14:54:07 +0000 (17:54 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 08:20:42 +0000 (08:20 +0000)
commite45e8a92a2ecab742b3680716a55aaa1d9827057
tree0445637891add752031b90dfb2f4a840ba54bf21
parent124b31f13e0dcef0a22b46e27672371c7c60a498
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

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I2a5db657c7dab54b8dc2c50bc29365d5ee754a2e
Reviewed-on: https://review.whamcloud.com/38235
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/scrub.c
lustre/osd-ldiskfs/osd_handler.c
lustre/tests/sanity-scrub.sh