Whamcloud - gitweb
LU-13560 lod: set default LMV for "lfs mkdir -c 1" 90/45290/11
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 13 Oct 2021 05:55:15 +0000 (01:55 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Jan 2022 22:02:38 +0000 (22:02 +0000)
commitbc2d7f065af6b4f9a69bc7d3d250b948b33a1018
tree55cb05e4156b51f50fbc4bff9ea336cfcdab1252
parent862f0baa7c21cb631b98d3886ef9e938f4519573
LU-13560 lod: set default LMV for "lfs mkdir -c 1"

With the introduction of filesystem-wide default LMV, dirs will be
created on MDT by space usage, but if dir is created by
"lfs mkdir -c 1 ...", its subdirs should be kept on the same MDT.
To achieve this, set default LMV on such dirs, NB if user doesn't
want this, he needs to create dir with
"lfs mkdir -c 1 --max-inherit=0 ...".

The policy to choose MDT in mkdir is as below:
1. is "lfs mkdir -i N"? mkdir on MDT N.
2. is "lfs mkdir -i -1"? mkdir by space usage.
3. is starting MDT specified in default LMV? mkdir on MDT N.
4. is default LMV space balanced? mkdir by space usage.

Changes on server side:
* Don't inherit default LMV for "lfs mkdir".
* Don't migrate default LMV in dir migration/split.

Remove setting default LMV in mkdir_on_mdt().

Update sanity 412.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I0ffdcf7a4a85a31e2df788198aeb5e9a910160d8
Reviewed-on: https://review.whamcloud.com/45290
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lmv/lmv_obd.c
lustre/lod/lod_object.c
lustre/mdd/mdd_dir.c
lustre/tests/sanity.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c