Whamcloud - gitweb
LU-11974 llapi: improve llapi_layout_get_by_xattr(3) API 63/34463/3
authorLi Xi <lixi@ddn.com>
Tue, 19 Feb 2019 02:33:20 +0000 (10:33 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Apr 2019 06:19:02 +0000 (06:19 +0000)
commit6669e463d7eb7eb1768ba5927d96447724ff525f
tree9c4f5ef135f27c77bd75ee4179d972bc54c043ee
parentf95ab9a42241a2a7319f6fa77e570f5526771afa
LU-11974 llapi: improve llapi_layout_get_by_xattr(3) API

llapi_layout_get_by_xattr() assumes that the lum has already
been properly swapped by llapi_layout_swab_lov_user_md().
However, llapi_layout_swab_lov_user_md() function is not
exported, so external tool won't be able to use it.

Instead of exporting a lot of APIs, this patch include the
swab functions into llapi_layout_get_by_xattr() and add an
argument flags to the API.

Lustre-change: https://review.whamcloud.com/34276
Lustre-commit: 89e43812da871bb560f3c50a0c36713ea7788e0a

Change-Id: I9fbf0f0ba66660d2f382fb20b03f069c1a7afad5
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34463
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/llapi_layout_get_by_fd.3
lustre/include/lustre/lustreapi.h
lustre/utils/liblustreapi_layout.c