Whamcloud - gitweb
LU-11025 dne: support directory restripe
This patch adds directory restripe support:
* 'lfs setdirstripe -m -1 -c <stripe_count>' on an existed directory
will change this directory layout, if 'stripe_count' is larger than
current count, new stripes are allocated after current stripes,
otherwise merge stripes of this directory, NB, if stripe count is
unchanged, but hash type changed, it's treated as merging, but
rehashing actually.
* mdt_restripe() ia added to restripe directory.
* mdd_dir_declare_layout_split() is added to split directory, which
handles both plain and striped directory split.
* lod_dir_declare_layout_split() will handle the internal of directory
split.
* directory merge is simple compared to split, which just records
target stripe count in LMV, and update it.
NB. this patch only restripe directory, but doesn't add the code to
migrate sub files, which will be implemented in the following patch.
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I526f7423b909eb83cf8723e65981d713b3e42499
Reviewed-on: https://review.whamcloud.com/36898
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: Yingjin Qian <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 files changed: