Whamcloud - gitweb
LU-1267 lfsck: framework (3) for MDT-OST consistency 62/7062/37
authorFan Yong <fan.yong@intel.com>
Fri, 24 Jan 2014 19:42:07 +0000 (03:42 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 31 Jan 2014 04:19:51 +0000 (04:19 +0000)
commit7e81f13c4a852cdba9fbebcc2b6385d6c2effa4b
treea50aaae20090c41e8fcc19cdbef77cfb3cd6c500
parent7a303a8250c7f2e20a72089cca6d9ac52daff632
LU-1267 lfsck: framework (3) for MDT-OST consistency

Introduce an assistant kernel thread to help to handle MDT-OST
consistency verification. The LFSCK main engine thread and the
assistant kernel thread compose an async mode pipeline:

For a given MDT-object, the LFSCK main engine thread reads its
layout EA, and for each stripe, it prefetches the OST-object's
attribute asynchronously. The LFSCK main engine thread doesn't
wait for the OST-object's attribute to be replied, intead, add
the request structure on the shared list.

The LFSCK assistant kernel thread scans the shared list, and
for each replied request, checks whether the OST-object's attr
is consistent with its MDT-object's attr or not. If found some
inconsistency, the LFSCK assistant kernel thread will fix it.

To avoid the LFSCK main engine thread is too much ahead of the
LFSCK assistant kernel thread as to too many objects have been
pre-fetched then memory pressure, use an async windows size to
control how many objects the LFSCK main engine thread can be
ahead of the LFSCK assistant kernel thread at most. It is also
used to control how many objects the assistant kernel thread
can be ahead of backend ptlrpcd threds at most. Such windows
size can be specified via the "lctl lfsck_start" command "-w"
option and can be adjusted dynamically via the proc interface
"lfsck_async_windows".

Test-Parameters: allwaysuploadlogs
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I41efd93bc614591a9aabe1099a13fbcc1275d2d9
Reviewed-on: http://review.whamcloud.com/7062
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
18 files changed:
lustre/include/lustre/Makefile.am
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_lfsck_user.h
lustre/include/lustre_lfsck.h
lustre/lfsck/lfsck_bookmark.c
lustre/lfsck/lfsck_engine.c
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/mdd/mdd_lproc.c
lustre/osp/osp_object.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/utils/lctl.c
lustre/utils/lustre_lfsck.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c