Whamcloud - gitweb
LU-13440 lmv: add default LMV inherit depth 31/43131/13
authorLai Siyao <lai.siyao@whamcloud.com>
Mon, 15 Mar 2021 03:57:36 +0000 (11:57 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 May 2021 02:52:11 +0000 (02:52 +0000)
commit01d34a6b3b2e34f7414f627e4f87993322dafa78
tree3a67433eb8b9034fa371d47d1921c31319dc008f
parent0ccce7ecb72f847f4235a513424d90119edad7ca
LU-13440 lmv: add default LMV inherit depth

A new field "__u8 lum_max_inherit" is added into struct lmv_user_md,
which represents the inherit depth of default LMV. It will be
decreased by 1 for subdirectories.

The valid value of lum_max_inherit is [0, 255]:
* 0 means unlimited inherit.
* 1 means inherit end.
* 250 is the max inherit depth.
* [251, 254] are reserved.
* 255 means it's not set.

A new field "__u8 lum_max_inherit_rr" is added, if default stripe
offset is -1, lum_max_inherit_rr is non-zero, and system is balanced,
new directories are created in roundrobin mannner, otherwise they
are created on the MDT where their parents are located to avoid
creating remote directories. And similarly this value will be
decreased by 1 for each level of subdirectories.

The valid value of lum_max_inherit_rr is different:
* 0 means not set.
* 1 means inherit end.
* 250 is the max inherit depth.
* [251, 254] are reserved.
* 255 means unlimited inherit.

However for the user interface of "lfs", the valid value is [-1, 250]:
* -1 means unlimited inherit.
* 0 means not set.
* others are the same.

Add sanity 413c.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I98ccad8556a0469f83bd7d79f5086a2184d5b115
Reviewed-on: https://review.whamcloud.com/43131
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
15 files changed:
lustre/doc/lfs-getdirstripe.1
lustre/doc/lfs-setdirstripe.1
lustre/include/lu_object.h
lustre/include/lustre/lustreapi.h
lustre/include/lustre_lmv.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/namei.c
lustre/lmv/lmv_obd.c
lustre/lod/lod_internal.h
lustre/lod/lod_object.c
lustre/obdclass/lu_tgt_descs.c
lustre/ptlrpc/pack_generic.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c