Whamcloud - gitweb
LU-3336 lfsck: orphan OST-objects iteration 03/8303/21
authorFan Yong <fan.yong@intel.com>
Wed, 12 Feb 2014 09:21:32 +0000 (17:21 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 26 Feb 2014 23:11:04 +0000 (23:11 +0000)
commit77eea1985bb1655e58c8b7df00703b4f08b58ec7
treec9dcd541450ea50d5bc7edff362578bd4bde7778
parentf2a404d1fec2287ef9ffda105727e8cd3f8e0b7b
LU-3336 lfsck: orphan OST-objects iteration

During the second stage scanning, the LFSCK on the MDT(s) will scan
the orphan OST-objects via OSP level iteration which fetches remote
orphan OST-objects information via OBD_IDX_READ RPC, and shares the
existing framework/functions with others, such as quota.

Implement the sponsor (the master LFSCK engine on the MDT) logic
for the orphan OST-objects iteration.

Implement LFSCK layout rbtree iteration - lfsck_orphan_index_ops,
for slave LFSCK on OST. The lfsck_orphan_index_ops is registered
onto the rbtree object. The incoming OBD_IDX_READ RPC for orphan
OST-object scanning will iterate the rbtree via dt_index_read to
call the registered lfsck_orphan_index_ops.

Others:
1) Speed control during the second-phase scanning.
2) The LFSCK layout trace file (on the MDT) flags should be set
   with LF_INCOMPLETE if LFSCK slave on OST restart or failed.
3) Some code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I67d5d870dbf9b80530f4d61ed1a3e5b5df70b1a0
Reviewed-on: http://review.whamcloud.com/8303
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
14 files changed:
lustre/fld/fld_handler.c
lustre/include/dt_object.h
lustre/include/lustre/lustre_idl.h
lustre/include/obd_target.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/mdt/mdt_handler.c
lustre/obdclass/dt_object.c
lustre/ofd/ofd_dev.c
lustre/osp/osp_object.c
lustre/ost/ost_handler.c
lustre/ptlrpc/pack_generic.c
lustre/tests/sanity-lfsck.sh