Whamcloud - gitweb
LU-11025 dne: change dir layout via dt_layout_change
This patch includes following changes:
* Use existing mo_layout_change()/dt_layout_change() interface to
change directory layout, which is cleaner and easier to add new
features. The supported layout change operations are:
1. MD_LAYOUT_DETACH: detach stripes from directory master object.
2. MD_LAYOUT_ATTACH: attach stripes after target's.
3. MD_LAYOUT_SHRINK: destroy stripes from specific offset.
* Previously layout change is done in MDD layer if striped directory
is remote, however LOD can handle remote striped directory the same
as local one, NB, remember to initialize index operations before
altering directory layout. In this way layer violation can be
avoided.
* Use setxattr(XATTR_NAME_LMV, LU_XATTR_CREATE) to create stripes
for directories, and '0' or 'LU_XATTR_REPLACE' to set or replace
directory LMV instead of setxattr(XATTR_NAME_LMV".set").
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Iac226f9e0e504f19837e14e93cee2542a2cb5e3d
Reviewed-on: https://review.whamcloud.com/37634
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>