Whamcloud - gitweb
LU-14119 osd: add mount option "resetoi" 02/41402/4
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 3 Feb 2021 03:44:15 +0000 (11:44 +0800)
committerLai Siyao <lai.siyao@whamcloud.com>
Mon, 22 Feb 2021 12:57:27 +0000 (20:57 +0800)
commit503917278a8f1dd7dd578fea6551de6c5dc4ebb9
treef12ba00c50ae6e6154d77fa25864423e866a9818
parent5eb69a6772037fcffbd0d112a42312731d2b374e
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
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