Whamcloud - gitweb
LU-6420 lfsck: misc fixes to avoid unexpected repairing 12/30612/1
authorFan Yong <fan.yong@intel.com>
Wed, 20 Dec 2017 13:12:38 +0000 (21:12 +0800)
committerFan Yong <fan.yong@intel.com>
Wed, 20 Dec 2017 13:12:38 +0000 (21:12 +0800)
commitbf0448c16e6d311b4773a80ec02ed9c48e8c11f4
treefadec8744087367c029d96976c6c2c2d6fc32f7a
parentdb2d74e8091a7b816d831babe428fa189e002544
LU-6420 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.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibf0e095ae2735c60b9b88e4b0992389c906728f9
lustre/include/lustre_update.h
lustre/osp/osp_object.c
lustre/target/out_handler.c