From: Chao Yu Date: Mon, 29 Jul 2019 11:56:20 +0000 (+0800) Subject: common/quota: enable project quota correctly on f2fs X-Git-Tag: v2022.05.01~1069 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=cda9817fbbe4f9127eca29717ce9027faf708296 common/quota: enable project quota correctly on f2fs Add a case for f2fs on _scratch_enable_pquota() to enable dependent features of project quota by mkfs. Signed-off-by: Chao Yu Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/quota b/common/quota index 659c6219..5e154fad 100644 --- a/common/quota +++ b/common/quota @@ -111,12 +111,17 @@ _require_getnextquota() # prior to mount. This is a relatively new feature ... _scratch_enable_pquota() { - [[ "$FSTYP" != ext[234] ]] && return - - tune2fs -O quota,project $SCRATCH_DEV >>$seqres.full 2>&1 - _try_scratch_mount >/dev/null 2>&1 \ - || _notrun "kernel doesn't support project feature on $FSTYP" - _scratch_unmount + case $FSTYP in + ext2|ext3|ext4) + tune2fs -O quota,project $SCRATCH_DEV >>$seqres.full 2>&1 + _try_scratch_mount >/dev/null 2>&1 \ + || _notrun "kernel doesn't support project feature on $FSTYP" + _scratch_unmount + ;; + f2fs) + _scratch_mkfs "-O extra_attr -O quota -O project_quota" >> $seqres.full 2>&1 + ;; + esac } #