Whamcloud - gitweb
LU-13560 lod: set default LMV for "lfs mkdir -c 1"
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 19 Jan 2022 05:29:56 +0000 (21:29 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 22 Jan 2022 08:24:06 +0000 (08:24 +0000)
commit4aec7e86e67ac9077c6095bcc38e6ed844b5d4f1
treefd14140fa31283c2a608ac88e15241361a90a45b
parent1122aa73580b1fa95ee332613054cd31f6e99fd4
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.

Lustre-change: https://review.whamcloud.com/45290
Lustre-commit: bc2d7f065af6b4f9a69bc7d3d250b948b33a1018

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I0ffdcf7a4a85a31e2df788198aeb5e9a910160d8
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46189
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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