Whamcloud - gitweb
LU-7230 llite: clear dir stripe md in ll_iget 77/16677/15
authorDi Wang <di.wang@intel.com>
Thu, 8 Oct 2015 07:51:16 +0000 (00:51 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Nov 2015 20:01:55 +0000 (20:01 +0000)
commitd05051c34077c74e3c08f3723bf6084554c0daf8
tree606f8c1b2f45c2d9a6ddc75967c8396589ed59b2
parent9126d8159d5d5b61a600e7427d0c173084a710e6
LU-7230 llite: clear dir stripe md in ll_iget

If ll_iget fails during inode initialization, especially
during striped directory lookup after creation failed,
then it should clear stripe MD before make_bad_inode(),
because make_bad_inode() will reset the i_mode, which
can cause ll_clear_inode() skip freeing those stripe MD.

Remove the name entry from the directory, once creation
failed. Note: this will not rollback all of local
operation, and LFSCK will take care of the orphan object.

Add sanity.sh 300p to verify the case.

And also enable lfs rm_entry for local object as well,
because sometimes it is quite possible to create the
local corrupted striped directory, and we might need
use "lfs rm_entry" to delete the corrupted striped dir.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I892c52117b83c8348aa0ceb888e73c84e79ffe46
Reviewed-on: http://review.whamcloud.com/16677
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/obd_support.h
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/mdd/mdd_dir.c
lustre/mdt/mdt_reint.c
lustre/target/out_lib.c
lustre/target/update_trans.c
lustre/tests/sanity.sh