Whamcloud - gitweb
LU-3536 lfsck: reuse parameter name for re-locating object 32/16932/7
authorFan Yong <fan.yong@intel.com>
Wed, 23 Sep 2015 15:24:02 +0000 (23:24 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Nov 2015 14:25:09 +0000 (14:25 +0000)
commitd7e621201ac5938731067a29fbc2e1c457dfb824
treeca6fdd89d4bd880de4ee93c8676851b0f53fda96
parent4c689a573fafcfa1ca7474a275f958e00b1deddc
LU-3536 lfsck: reuse parameter name for re-locating object

Usually, LFSCK engine will locate the object against the bottom
device (OSD), then make related check/repair directly. Sometimes,
such as lfsck_namespace_repair_dirent(), we need to modify based
on LOD device. Under such case, the LFSCK will re-locate related
object with the same FID.

Originally, there is no special rules about the parameter's name,
that is confused which one should be used. For example, the input
parameter is named as "parent" that is against OSD, we need to
re-locate the obj based on the LOD, named as "pobj", then in the
subsequent logic, "pobj" should be used, but unfortunately, the
"parent" may be used by wrong. It is difficult to find out such
invalid usage.

To avoid such trouble, we prefer to reuse the (input) parameter
name after re-locating the object, name "pobj" as "parent".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5b6d7c5c10e1817ef2bade4931485228b26c511d
Reviewed-on: http://review.whamcloud.com/16932
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>
lustre/lfsck/lfsck_namespace.c