Whamcloud - gitweb
LU-14119 osd: add mount option "resetoi" 02/41402/8
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 3 Feb 2021 03:44:15 +0000 (11:44 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 6 Apr 2021 03:02:38 +0000 (03:02 +0000)
commitf37bce8a573dfc5aac1b9f51f4d5c8314ba05d30
treeec606d1fb6cc380040af38b631ea2dd74dcc0f9d
parent99d00b97ef5f209a002f250e7772055ff1a6d6d6
LU-14119 osd: add mount option "resetoi"

OI files on zfs are special, and they can't be deleted by user space
tools like rm. Sometimes the OI files may contain stale OI mappings,
and they needed to be removed for namespace consistency. Add a mount
option 'resetoi' to recreate OI files on mount time, and it will
support both ldiskfs and zfs. This should be the standard way to
recreate OI files, other than mount as backend filesystem and unlink
them manually.

Add sanity-scrub 17.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Idc0e4c2f3b81675c49c6c005bc30b61d8fd04503
Reviewed-on: https://review.whamcloud.com/41402
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_oi.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_oi.c
lustre/osd-zfs/osd_scrub.c
lustre/tests/sanity-scrub.sh