Whamcloud - gitweb
LU-10422 lfsck: misc fixes to avoid unexpected repairing 28/30628/2
authorFan Yong <fan.yong@intel.com>
Thu, 21 Dec 2017 12:39:02 +0000 (20:39 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 2 Feb 2018 18:12:11 +0000 (18:12 +0000)
commit498ac57a033ff12ed1dc5c71adf90ed5fcfbfd93
treeb08c693ee9717aaa249e277ff17dff1086783c08
parente82d8ad284fd37bbc4863723aa42c927d456fae6
LU-10422 lfsck: misc fixes to avoid unexpected repairing

There are several issues that will misguide LFSCK to
trigger unexpected RPC or repairing by wrong, including:

1) object_update_result_insert() should pack the OUT RPC
   result (not the return value) into the reply buffer via
   object_update_result::our_data. But it did that in some
   wrong address.

2) out_xattr_get() used wrong index to obtain the EA buffer
   as to may overwrite former update (such as OUT_XATTR_GET)
   results.

3) osp_declare_xattr_get() does not consider the last '0'
   of the EA name for the length parameter for
   osp_insert_async_request().

4) osp_xattr_get_interpterer() missed to handle the positive
   value for the given parameter @rc. That will cause the PFID
   EA to be double read when the target OST-object has it.

Back port from master:
Lustre-commit: bf0448c16e6d311b4773a80ec02ed9c48e8c11f4
Lustre-change: http://review.whamcloud.com/30612

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibf0e095ae2735c60b9b88e4b0992389c906728f9
Reviewed-on: https://review.whamcloud.com/30628
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/lustre_update.h
lustre/osp/osp_object.c
lustre/target/out_handler.c