Whamcloud - gitweb
LU-3539 osp: Fix a series of UPDATE_OBJ endianness bugs 88/7088/34
authorLi Wei <wei.g.li@intel.com>
Tue, 23 Jul 2013 15:19:49 +0000 (23:19 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 13 Mar 2014 05:48:44 +0000 (05:48 +0000)
commit3ca197b4aa3b2fc11da9a946db597e73a62fe149
tree5dad126a6790924ffa1f66df14c6393faac344f1
parenta89a63d22879014d1ac09a86d43b4e27940ac555
LU-3539 osp: Fix a series of UPDATE_OBJ endianness bugs

Current UPDATE_OBJ code have the following problems:

  - Fields in "struct update_buf", except for ub_bufs, are sent in
    senders' host endianness but expected to be little-endian by
    receivers.

  - Fields in "struct update", except for u_bufs, are sent in
    little endianness but used without swabbing by receivers.

  - Most u_bufs are sent in little endianness, but some are in
    senders' host endianness.

  - Sizes for a couple of string buffers in osp_md_declare_xattr_set()
    and osp_md_xattr_get() are off-by-one.

  - Error numbers in UPDATE_OBJ replies are not translated on both
    sides.

This patch fixes them by sending all data in UPDATE_OBJ requests and
replies in host endianness, following Lustre's usual practices.

Change-Id: Id3ffb248af181b4beff2b62c9cb46fc6d9f9e673
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/7088
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_class.h
lustre/obdclass/obdo.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/osp/osp_trans.c
lustre/target/out_handler.c