Whamcloud - gitweb
LU-10288 lfsck: layout LFSCK for mirrored file 05/32705/5
authorFan Yong <fan.yong@intel.com>
Sat, 14 Jul 2018 21:15:21 +0000 (05:15 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Aug 2018 14:34:41 +0000 (14:34 +0000)
commit36ba989752c62cc76b06089373fcd6cec6da9008
treebcc32b623c95e3bc1d42005ac91065dc1b30e84b
parent2131e4eda8fa354747d09bd3427a0a1d19c931e4
LU-10288 lfsck: layout LFSCK for mirrored file

This patch makes the layout LFSCK to support mirrored file
as following:

1. Verify mirrored file's LOV EA and PFID EA, including all
   kinds of inconsistencies as non-mirrored file may hit.

2. Rebuild mirrored file's LOV EA from orphan OST-objects,
   recover the component's status/flags before the crash:
   init, stale, and so on.

3. For the mirrored file with dangling reference (OST object),
   it does NOT rebuild the lost OST-object from other replica,
   instead, it either reports the curruption or re-create empty
   OST-object that follows the same rules as non-mirrored case.

Some code cleanup and new test cases for LFSCK against mirrored file.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I560746fc2aae40101dcb0e8513b6c7ed54902ec6
Reviewed-on: https://review.whamcloud.com/32705
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
lustre/include/lustre_swab.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/obdclass/dt_object.c
lustre/osp/osp_object.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity-lfsck.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c