Whamcloud - gitweb
LU-8998 lustreapi: composite llapi_layout
authorNiu Yawei <yawei.niu@intel.com>
Thu, 28 Jan 2016 07:04:02 +0000 (02:04 -0500)
committerJinshan Xiong <jinshan.xiong@intel.com>
Thu, 6 Apr 2017 04:31:52 +0000 (21:31 -0700)
commitc4702b7443c94a9cf97a8aa9dc96ad15efe91d1a
tree75d0912737eebd98f3304e036fcb0d3cb5e5ebea
parentfafe6b4d4a6fa63cedff3bd44e6578009578b3d7
LU-8998 lustreapi: composite llapi_layout

Extend the llapi_layout API to support composite layout.

- llapi_layout_comp_add():
  Add one component to an existing layout, the layout will
  be turned into composite if it was plain before adding.

- llapi_layout_comp_del():
  Delete current layout component from a composite layout,
  the component to be deleted must be the tail of layout
  component list, and it can't be the last one.

- llapi_layout_comp_extent_get/set():
  Get/Set current component extent of a layout. When set
  component extent, the layout will be turned into composite
  if it was plain.

- llapi_layout_comp_flags_get/set/clear():
  Get/Set/Clear current component flags of a composite layout.

- llapi_layout_comp_id_get():
  Get current component ID of a composite layout.

- llapi_layout_comp_move_at():
  Move the current component to a component with specified ID.

- llapi_layout_comp_move():
  Move the current component to a specified position: FIRST,
  NEXT, or LAST.

- llapi_layout_file_comp_add():
  Add component(s) to an existing composite file.

- llapi_layout_file_comp_del():
  Delete component(s) from an existing composite file.

- llapi_layout_file_comp_set():
  Set certain attribute of the specified layout component(s). Not
  implemented in PFL phase 2.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I44094149636be3162fc7f8b75a90c64abf2c3c02
Reviewed-on: https://review.whamcloud.com/24866
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
lustre/include/lustre/lustreapi.h
lustre/tests/llapi_layout_test.c
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_layout.c
lustre/utils/lustreapi_internal.h