Whamcloud - gitweb
LU-8998 lustreapi: composite llapi_layout 66/24866/15
authorNiu Yawei <yawei.niu@intel.com>
Thu, 28 Jan 2016 07:04:02 +0000 (02:04 -0500)
committerJinshan Xiong <jinshan.xiong@intel.com>
Wed, 8 Mar 2017 17:04:50 +0000 (17:04 +0000)
commitc2b3dba3930dcc65a4c85fcd6a9d295843d5030c
tree0e4d6f8ee94ea6c8a6cfbfcc55674a30136ec955
parent3c8ba6bc531f2ce27d755e9fff1c32b70939745e
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