Whamcloud - gitweb
LU-3594 lfsck: repair inconsistent owner and multiple referenced cases 24/7524/30
authorFan Yong <fan.yong@intel.com>
Mon, 10 Feb 2014 13:16:50 +0000 (21:16 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Feb 2014 00:16:28 +0000 (00:16 +0000)
commit51f5621c04b363dcde7e1bb3dcdb2ebd3b2919fd
tree9bb67f1ff9f45c2357ffbd7c37e48cabe059575c
parent2c67b17fd183ef60baba74e914e96b9b292bfc39
LU-3594 lfsck: repair inconsistent owner and multiple referenced cases

Sometimes, the OST-object owner information is inconsistent with the
MDT-object owner information because of incompleted chown/chgrp, or
other system crash. Under such case, the MDT-object owner information
is trusted over the OST-object's. Because the chown/chgrp processing
order is: client => MDT => OST, it is possible that the OST-object
owner information is stale rather than the MDT-object's. Also, the
MDT-object's owner information is visible to users and can be directly
repaired by the system administrator, while the OST-object's owner
information is only used internally by quota. So the LFSCK will update
the OST-object owner information according to the MDT-object's owner.

If both MDT-object1 and MDT-object2 claim the OST-object1 as one
of its child OST-object, but the OST-object1 only recognizes the
MDT-object1, then the LFSCK will create new a OST-object and fix
the MDT-object2's layout information to reference the new created
OST-object.

Replace is_remote_th() with is_only_remote_trans(), then drop the
compat patch http://review.whamcloud.com/9361

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I6b148180b5a2d68650b291250c03aac651e5f6e9
Reviewed-on: http://review.whamcloud.com/7524
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_support.h
lustre/lfsck/lfsck_layout.c
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/mdd/mdd_object.c
lustre/osp/osp_internal.h
lustre/osp/osp_object.c
lustre/osp/osp_trans.c
lustre/target/out_lib.c
lustre/tests/sanity-lfsck.sh