Whamcloud - gitweb
LU-8569 lfsck: handle linkEA overflow 41/23741/10
authorFan Yong <fan.yong@intel.com>
Fri, 23 Sep 2016 05:00:47 +0000 (13:00 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Jan 2017 18:58:55 +0000 (18:58 +0000)
commit048a8740ae26e3406a7eab3bca383a90490cef93
treef31c642401cc1d4cab4f4f1a2bbb47e015e37398
parente240fb5099af8e62c532d314317095800ebb6864
LU-8569 lfsck: handle linkEA overflow

If the linkEA is marked as overflow (32 bits timestamp in header),
and even if some hard links are removed, we still cannot clear the
overflow timestamp, because the missed hard links entries are still
not in the linkEA. It is the namespace LFSCK's duty to add the missed
entries into the linkEA (if possible) and clear the overflow timestamp
if all the hard links entries are in the linkEA. But it is possible
that there are some new hard links added during the namespace LFSCK
scanning. So the namespace LFSCK needs to compare the linkEA overflow
timestamp with the namespace LFSCK latest reset time (scan the system
from the beginning) in the 2nd-stage scanning. If the latter one is
newer, then means all the hard links entries have been in the linkEA,
so the linkEA overflow timestamp can be cleared.

To avoid the trouble caused by clock drift among MDTs, the linkEA
overflow timestamp will be set as the MDT local time on which the
object resides even if the set linkEA operation is sponsored by
some remote MDT. So we can directly compare the linkEA overflow
time with the namespace LFSCK latest reset time.

The old interfaces between MDD/OUT and LFSCK via lfsck_in_notify()
for the linkEA overflow event are obsoleted and removed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia2c3f9d0a0ecb0b3285041f1365cb4e075a07dda
Reviewed-on: https://review.whamcloud.com/23741
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
14 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/obd_support.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/lfsck/lfsck_namespace.c
lustre/lfsck/lfsck_striped_dir.c
lustre/mdd/mdd_dir.c
lustre/ptlrpc/wiretest.c
lustre/target/out_lib.c
lustre/tests/sanity-lfsck.sh
lustre/tests/sanity.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c