Whamcloud - gitweb
LU-11023 quota: quota pools for OSTs 15/35615/52
authorSergey Cheremencev <c17829@cray.com>
Fri, 12 Jul 2019 13:38:35 +0000 (16:38 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:38:29 +0000 (05:38 +0000)
commit09f9fb3211cd998c87e26df5217cc4ad84e6ce0b
treeda190e74bdf2b636482e1913edff4573b70cdf37
parent13a0066afb8d89b12653ff72f7311fd5e03ef6b4
LU-11023 quota: quota pools for OSTs

Patch allows to apply quota settings
not only for the whole system, but also
for different OST pools. Since this patch
each "LOD" pool is duplicated by QMT.
Thus quota pools(QP) could be tuned by
standard lctl pool_new/add/remove/erase
commands. All QPs are subset of a global pool
that includes all data devices in a system,
including DOM. However DOM is not supported.
I don't see a lot of work to add DOM support
in future - just need to decide how MDTs
could be combined in a pool.

The main idea of QP is to find all pools
for requested ID(usr/grp/prj) and apply
minimum limit. The patch doesn't affect
qsd side, so slaves know nothing about
pools and different limits. Qunit and edquot
are calculated for each slave on master.

To apply quota on QP, the patch adds key "-o"
to lfs setquota. To get quotas for QP, it
provides long option "--pool" in lfs quota.
See examples of using in sanity-quota_1b/c/d.

Now QPs work properly only on a clean system.
Support of recalculation granted space in case
of adding/removing OSTs in a pool will be added
in the next patch together with accounting
already granted space by each ID in a POOl.

Test-Parameters: testgroup=review-dne-part-4

Change-Id: I3396aded2156729b4fd15166eb59db59ee4c967e
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-on: https://review.whamcloud.com/35615
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
37 files changed:
lustre/include/lu_object.h
lustre/include/lustre_quota.h
lustre/include/lustre_req_layout.h
lustre/include/lustre_swab.h
lustre/include/obd_target.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/dir.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_pool.c
lustre/lod/lod_qos.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/obdclass/genops.c
lustre/obdclass/obd_config.c
lustre/obdclass/obd_mount.c
lustre/ptlrpc/Makefile.in
lustre/ptlrpc/layout.c
lustre/ptlrpc/pack_generic.c
lustre/quota/lquota_disk.c
lustre/quota/lquota_entry.c
lustre/quota/lquota_internal.h
lustre/quota/qmt_dev.c
lustre/quota/qmt_entry.c
lustre/quota/qmt_handler.c
lustre/quota/qmt_internal.h
lustre/quota/qmt_lock.c
lustre/quota/qmt_pool.c
lustre/quota/qsd_entry.c
lustre/quota/qsd_handler.c
lustre/quota/qsd_lock.c
lustre/target/Makefile.am
lustre/target/tgt_pool.c [new file with mode: 0644]
lustre/tests/sanity-quota.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c