Whamcloud - gitweb
LU-12589 llite: swab LOV EA data in ll_getxattr_lov() 36/35736/2
authorJian Yu <yujian@whamcloud.com>
Thu, 8 Aug 2019 19:13:47 +0000 (12:13 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:45:51 +0000 (07:45 +0000)
commit48007300255836ec81b1d037ec450e71b8a754a8
tree9903af977786a849bd928f06458c0f39d559ff2a
parent632bf95a442931b97c2ea4816fa3e56a7853a2a2
LU-12589 llite: swab LOV EA data in ll_getxattr_lov()

On PPC client, the LOV EA data returned by getfattr from x86_64 server
was not swabbed to the host endian. While running setfattr, the data was
swabbed in ll_lov_setstripe_ea_info(), which caused magic mis-match in
ll_lov_user_md_size() and then ll_setstripe_ea() returned -ERANGE.

This patch fixed the above issue by swabbing LOV EA data in ll_getxattr_lov().

Test-Parameters: clientarch=ppc64 \
envdefinitions=ONLY="24D 102a" testlist=sanity

This patch is back-ported from the following one:
Lustre-commit: f4a5957164bb981c93072bb0a28118bb7207a209
Lustre-change: https://review.whamcloud.com/35626

Change-Id: I8069df0c8f07c0bedba2e27db7c3a5553f11afb4
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35736
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_swab.h
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/xattr.c
lustre/ptlrpc/pack_generic.c