Whamcloud - gitweb
LU-3951 lfsck: OST-object inconsistency self detect/repair 67/7667/30
authorFan Yong <fan.yong@intel.com>
Mon, 17 Feb 2014 00:44:00 +0000 (08:44 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 2 Mar 2014 21:53:53 +0000 (21:53 +0000)
commit730a204e73667403e299936fafa0d3eb45099709
treed80ad04798351a6da8a901c77b6a564cfed1d824
parente43581dcd18c76f391e8d5daa314d6c684c63b66
LU-3951 lfsck: OST-object inconsistency self detect/repair

When client sends object-based RPC to the OST, the RPC service
thread on the OST needs to verify whether the given parent FID
in the client RPC matches the parent FID information stored in
the OST-object.

When the client given PFID does not match the OST local stored
PFID, then the OST will return "-EINPROGRESS" to the client for
retry later to avoid the RPC service thread to be blocked for
long time. On the other hand, there will be a dedicated thread
to talk with the LFSCK for the PFID verification. If the client
given parent FID information is incorrect, then deny the access;
otherwise, if the OST local stored PFID attribute is invalid,
then the OST local stored PFID xattr will be repaired.

Other fixes:
1) Hold update lock on the .lustre/lost+found/MDTxxxx object
   when add new name entry for handling orphan OST-object.
2) Hold dt_write_lock on the OST-object to be destroyed before
   transaction start, the same as normal ofd_object_destroy does.
3) Simplify the lfsck_layout_recreate_lovea() implementation.
4) Make sanity-lfsck test_18 to be workable under both DNE and
   non-DNE cases.
5) Other code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iefd26fe1782761ab16954a00aea0788c39534580
Reviewed-on: http://review.whamcloud.com/7667
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
23 files changed:
lustre/fld/fld_handler.c
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre_lfsck.h
lustre/include/obd_support.h
lustre/lclient/lcommon_cl.c
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/obdclass/dt_object.c
lustre/obdclass/obd_mount_server.c
lustre/ofd/lproc_ofd.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_io.c
lustre/ofd/ofd_objects.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/target/out_handler.c
lustre/tests/sanity-lfsck.sh
lustre/utils/ll_decode_filter_fid.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c