Whamcloud - gitweb
LU-14388 utils: always enable ldiskfs project quota
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 30 Jan 2021 19:42:36 +0000 (12:42 -0700)
committerLi Xi <lixi@ddn.com>
Thu, 11 Mar 2021 14:28:48 +0000 (14:28 +0000)
Always enable project quota for newly-formatted ldiskfs filesystems.

Lustre-change: https://review.whamcloud.com/41370
Lustre-commit: 79642e08969eb4455bd8e23574b76f0a84d4db23

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1b0f745bc04b5c42592bcc4fd9823d068fef2a79
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/41964
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/libmount_utils_ldiskfs.c

index 91d0f2b..72acb76 100644 (file)
@@ -510,6 +510,9 @@ static int enable_default_ext4_features(struct mkfs_opts *mop, char *anchor,
        /* Enable quota by default */
        if (is_e2fsprogs_feature_supp("-O quota")) {
                append_unique(anchor, ",", "quota", NULL, maxbuflen);
+               /* Enable project quota by default */
+               if (is_e2fsprogs_feature_supp("-O project"))
+                       append_unique(anchor, ",", "project", NULL, maxbuflen);
        } else {
                fatal();
                fprintf(stderr, "\"-O quota\" must be supported by "