Whamcloud - gitweb
LU-14792 llite: enable filesystem-wide default LMV
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 4 Aug 2021 02:33:41 +0000 (10:33 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 13 Aug 2021 17:05:57 +0000 (17:05 +0000)
commit23bee2a9936ab63972fa779b910812fff0e06ad9
tree4f45e1d1522720c87ccaebe8d407d8e9a98c5025
parentf47190279e659ec20f781814dd0ed5b87800ac5f
LU-14792 llite: enable filesystem-wide default LMV

This change includes three parts:
1. save dir depth to ROOT after lookup on client side.
2. once space balanced default LMV is set on ROOT, and
   max-inherit/max-inherit-rr is unlimited or not less than directory
   depth, new directory will be created in QOS or roundrobin mode.
3. set ROOT default LMV max-inherit unlimited, and max-inherit-rr to
   3, and increase the ratio to create subdirectory on local MDT with
   the directory depth to ROOT, so that new directories will be
   created by space usage, and the deeper it's located it's more
   likely to create on local MDTs; and the top 3 layer will be created
   in roundrobin mode if system is balanced.

Set default LMV in mkdir_on_mdt() to make sure its subdirectories are
created on the same MDT. Add sanity 413d.

Create a test directory on MDT0 for pjdfstest, because cross-MDT
rename of symlink will migrate symlink to target MDT, which will cause
inode change (LU-11631).

Lustre-change: https://review.whamcloud.com/44090
Lustre-commit: b9c4dc3c33fe87ecaa79a290190524ea21b7fa8a

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ib3a133ac99655ca04443b9498e6618033f6b88b9
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44464
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
16 files changed:
lustre/include/obd.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/llite/statahead.c
lustre/lmv/lmv_obd.c
lustre/lmv/lproc_lmv.c
lustre/lod/lod_object.c
lustre/lod/lproc_lod.c
lustre/mdd/mdd_device.c
lustre/tests/pjdfstest.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh