Whamcloud - gitweb
LU-18720 quota: check for project quota 66/58066/8
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 13 Feb 2025 13:27:14 +0000 (16:27 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:00:44 +0000 (04:00 +0000)
lqi_ignore_root_proj_quota should be checked only with project quota,
otherwise it's state is undefined and can lead to undefined results.

Fixes: 2686838fef ("LU-18240 sec: enforce per-nodemap project quota for root")
Test-Parameters: testlist=sanity-quota,sanity-quota,sanity-quota
Test-Parameters: fstype=zfs testlist=sanity-quota,sanity-quota,sanity-quota
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I02896639ed375ddd314fa44dc9cddb008b1dbb0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58066
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
lustre/quota/qsd_handler.c

index 0567ad7..2960447 100644 (file)
@@ -896,7 +896,7 @@ int qsd_op_begin(const struct lu_env *env, struct qsd_instance *qsd,
            (qsd->qsd_type_array[qi->lqi_type])->qqi_acct_failed)
                RETURN(0);
 
-       if (local_flags && qi->lqi_id.qid_projid &&
+       if (qi->lqi_type == PRJQUOTA && local_flags && qi->lqi_id.qid_projid &&
            (qsd->qsd_root_prj_enable || !qi->lqi_ignore_root_proj_quota))
                *local_flags |= QUOTA_FL_ROOT_PRJQUOTA;