Whamcloud - gitweb
LU-18240 sec: enforce per-nodemap project quota for root
Add a new 'ignore_root_prjquota' rbac role on nodemaps, enabled by
default. When not present, project quota for root is enforced for
clients part of this nodemap.
The tricky part is to find a way to pass this nodemap-related
information to the quota enforcement code. On the data path, this is
put in the transaction handle in a field 'th_ignore_root_proj_quota'
when ofd_trans_create() is called. Then the OSD layer is able to put
it in a field 'lqi_ignore_root_proj_quota' of struct lquota_id_info,
so that it can be checked by the QSD handler.
On the metadata path, it needs one more intermediate step as the MDD
layer does not have access to the client export to retrieve the
nodemap. So a new field 'uc_rbac_ignore_root_prjquota' is added to
struct lu_ucred. It is set in ucred_set_rbac_roles(), and used in
mdd_trans_create() to put the value in the transaction handle.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I71292fb76cbc6476b8ead83bf7a686fd1b03611e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56436
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
23 files changed: