Whamcloud - gitweb
LU-11974 llapi: improve llapi_layout_get_by_xattr(3) API 76/34276/8
authorLi Xi <lixi@ddn.com>
Tue, 19 Feb 2019 02:33:20 +0000 (10:33 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 8 Mar 2019 21:48:55 +0000 (21:48 +0000)
commit89e43812da871bb560f3c50a0c36713ea7788e0a
treee1c453191a064632b6c54ae667d8f22e3e366605
parentf28353b3d810cfbec018a263556ceac84ab9413e
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.

Change-Id: I9fbf0f0ba66660d2f382fb20b03f069c1a7afad5
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/34276
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.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