Whamcloud - gitweb
LU-18244 utils: add 'lfs mkdir -C -N' overstriping support 25/56925/7
authorKeguang Xu <squalfof@gmail.com>
Fri, 8 Nov 2024 01:35:00 +0000 (09:35 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2024 08:17:50 +0000 (08:17 +0000)
commit11dab05d8bc9a35841c945887066c5e8abeb493f
tree1712e5037f88004e0be36b0367ed87a6db540468
parent6296ea7bc6a46b9c372e054ba6703d141d5495cd
LU-18244 utils: add 'lfs mkdir -C -N' overstriping support

Adding support of "-N" in "lfs mkdir -C -N" which specify the
overstripe factor for each MDT. While meta-overstriping has already
been introduced (refer LU-12273), this change mainly aligns the
mkdir -C -N with the overstriping behavior OSTs.

- Util side, add range check [-5, -1] if overstriped enabled within
  lfs_setdirstripe().
- Server side, in lod_object.c::lod_ah_init() where the decision of
striping configuration is made, we adjust the ldo_dir_stripe_count
value account for the specified overstripe factor.
- Macro LMV_OVERSTRIPE_COUNT_{MIN, MAX} added indicating the overstipe
  count for each MDT, in -N format.

Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: I99bdd543c1482798441d8753f4aeb2b7190060a8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56925
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lod/lod_object.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/lustreapi_internal.h