Whamcloud - gitweb
LU-3335 osd: self repair LMA by the RPC service thread 44/7144/10
authorFan Yong <fan.yong@intel.com>
Wed, 4 Sep 2013 14:32:51 +0000 (22:32 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 6 Nov 2013 06:59:43 +0000 (06:59 +0000)
commitfb1e9c68183549b030a68f89ed45c6bace1a3daa
tree799dba660088ef5b7a3642b837426bd5c1c31ebe
parentee3fa324a331f1aff1c42e900170944756f5a725
LU-3335 osd: self repair LMA by the RPC service thread

Current OI scrub uses the FID in LMA to locate the OI mapping and
repair the inconsistent OI mapping. Such inode table based system
scanning does not guarantee all OI inconsistency can be repaired,
such as inode without LMA or with crashed LMA, or cannot find out
dummy OI mappings (the object for the OI mapping does not exist).

In fact, after the inode table based scanning, the OI scrub can
make another OI table based scanning to resolve above mentioned
issues. But such scanning will be nonlinear, so performance may
be bad.

Currently, we have some other relative simple solution although
they are not perfect. We can make the RPC service thread to fix
the found inconsistency by itself: when verify the LMA with the
given FID, and found no LMA, then generate LMA according to the
given FID and store the new LMA as the inode xattr. Usually, it
is rare case that the inode has no LMA. So such additional work
for the RPC service thread will not affect performance much.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic6b8b533e56b6a0e388d5c38de7b113cb9bd6dad
Reviewed-on: http://review.whamcloud.com/7144
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_lproc.c