Whamcloud - gitweb
LU-11584 osd-ldiskfs: fix lost+found object replace 46/33546/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 1 Nov 2018 08:59:04 +0000 (02:59 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Feb 2019 02:00:43 +0000 (02:00 +0000)
commit900352f2bc15906a8fba9cb889df4b166a53bade
treeea05491b9a904c2974743056afe1ad5f0fc19a92
parent7130551d63c155534ab62cb4942b7c88556daad4
LU-11584 osd-ldiskfs: fix lost+found object replace

Fix the case where an OST object is being moved from lost+found
and an unused OST object is found in the object tree with the
same OID.  The unused object was being deleted, but the object
was not being moved from lost+found in this case.

Continue on with moving the object from lost+found unless an
error was returned from the unlink (excluding -ENOENT).

Fix sanity-scrub.sh test_14 to run e2fsck after the test to
verify that OI Scrub repaired the lost+found objects correctly.

The check_and_prep() helper erases the filesystem and should
only be used in cases like sanity-scrub and sanity-lfsck where
it matters.  Remove unnecessary call from sanity test_409().

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6fc6a15b1ca3d8e34bfd2d1266f80fc0730540e5
Reviewed-on: https://review.whamcloud.com/33546
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/tests/sanity-scrub.sh
lustre/tests/sanity.sh