Whamcloud - gitweb
LU-11111 lfsck: skip orphan processing 28/34528/2
authorAlexey Lyashkov <c17817@cray.com>
Wed, 8 Aug 2018 04:47:51 +0000 (07:47 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Apr 2019 06:28:19 +0000 (06:28 +0000)
commit92912099c0ee982d11019b2c586e255654eb9f45
tree9ac2334c7f1ff8c43d94bc760898ee9387adc42d
parentc44b6a5f36c66b3c02846c4ccaa6eca5bf061434
LU-11111 lfsck: skip orphan processing

LFSCK can reconnect a recently-deleted orphan object back
into the normal namespace when it shouldn't.  This can
cause access to the deleted data (potential security risk),
and sometimes cause an assertion if orphan is later deleted.

Skip LFSCK on orphan objects.  Fix the handling of the
LUSTRE_ORPHAN_FL in both osd-zfs and osd-ldiskfs so that
la_valid |= LA_FLAGS is set when la_flags |= LUSTRE_ORPHAN_FL
is set, otherwise the upper layers cannot properly detect it.

Clean up alignment of flags values and provide hex equivalents
so that they are more easily referenced during debugging.

Lustre-change: https://review.whamcloud.com/32959
Lustre-commit: 077570483e75e0610fd45149b926097547c434b8

Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9b2809b95efa4b3c3e3b2c7d0a501624ed743ede
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34528
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_disk.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lfsck/lfsck_engine.c
lustre/mdd/mdd_object.c
lustre/mdd/mdd_orphans.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_scrub.c
lustre/tests/sanity-lfsck.sh