Whamcloud - gitweb
LU-12624 lod: alloc dir stripes by QoS 25/35825/13
authorLai Siyao <lai.siyao@whamcloud.com>
Sun, 4 Aug 2019 18:08:02 +0000 (02:08 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 28 Oct 2019 17:06:18 +0000 (17:06 +0000)
commitc1d0a355a6a64ec97c9f56c38ba036e5e50cd8c4
treea0c46d4a32b1634e5bb21398269f1133bf83d4a8
parenta120bb13525727654713f008ffcaf0e3aec7cb65
LU-12624 lod: alloc dir stripes by QoS

Similar to file OST object allocation, introduce directory stripe
allocation by space usage, but they don't share the same code because
of the many differences between them: file has mirrors, PFL, object
precreation; while for directory, the first stripe is always on the
same MDT where its master object is on. The changes include:
* add lod_mdt_alloc_qos() to allocate stripes by space/inode usage.
* add lod_mdt_alloc_rr() to allocate stripes round-robin.
* add lod_mdt_alloc_specific() to allocate stripes in the old way.
* add sysfs support for lmv_desc field in LOD structure, and move
  those remain in procfs to sysfs.

This patch also changes LMV QoS code:
* mkdir by QoS if user mkdir by command 'lfs mkdir -i -1 ...', or the
  parent directory default LMV starting MDT index is -1.
* with the above change, 'space' hash flag is useless, remove all
  related code.
* previously 'lfs mkdir -i -1' QoS code is in lfs_setdirstripe(),
  but now it's done in LMV, remove the old code.

Update sanity 413a 413b to support QoS mkdir of both plain and
striped directories.

Update lfs-setdirstripe man to reflect the changes.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I8f5f8e46faae68ffd9a49a4ac1d450e951e979c5
Reviewed-on: https://review.whamcloud.com/35825
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
22 files changed:
lustre/doc/lfs-setdirstripe.1
lustre/include/lprocfs_status.h
lustre/include/lustre_lmv.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_pool.c
lustre/lod/lod_qos.c
lustre/lod/lproc_lod.c
lustre/mdt/mdt_reint.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lu_tgt_descs.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c