Whamcloud - gitweb
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>