Whamcloud - gitweb
LU-6235 scrub: replace the stale OI mapping 45/13745/3
authorFan Yong <fan.yong@intel.com>
Thu, 20 Nov 2014 04:54:59 +0000 (12:54 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Feb 2015 22:08:32 +0000 (22:08 +0000)
commitd0f1eb789697ab49b02d3be14b35d7d40c895d14
treec7d46008b6a2464a5870a1388bc7fbe1c0ea4bb4
parent31595f94e232293fe9f0688a5aa8f40230963674
LU-6235 scrub: replace the stale OI mapping

If the OI mapping on the OST contains an invalid one, then the OI
lookup via osd_obj_map_lookup() may return -ENOENT. From the view
of OI scrub, it is indistinguishable from the case of there is no
such OI mapping, then it will cause the OI scrub to use "INSERT"
@ops for osd_scrub_refresh_mapping() to repair such inconsistency
by wrong. So the osd_obj_map_lookup() should return -ESTALE under
the case of invalid OI mapping exists, then the OI scrub can use
"UPDATE" @ops for osd_scrub_refresh_mapping() to repair.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I013125eb0aaec683ac8f56ec32a30e7858262f87
Reviewed-on: http://review.whamcloud.com/13745
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_scrub.c