Skip to contentSkip to conversation

generic: test per-type quota softlimit enforcement timeout

PATCH New Zorro Lang 1 participant 1 message Jul 5, 2020

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH v4 1/1 generic: test per-type quota softlimit enforcement timeout

Set different block & inode grace timers for user, group and project quotas, then test softlimit enforcement timeout, make sure different grace timers as expected.

---

Hi,

V4 add a new function filter_enospc_edquot(), to deal with project quota.

After Eric's patch (c8d329f311c4d3d8f8e6dc5897ec235e37f48ae8) merged, xfs has a fixed return value when project quota is exceeded. But for current linux kernel, different filesystems have different return value. Some filesystems return ENOSPC (e.g. XFS), some filsystems return EDQUOT(e.g. ext4). The behavior isn't definitized. So filter the ENOSPC and EDQUOT output.

Thanks,
Zorro

 common/quota          |   4 +
 tests/generic/603     | 202 ++++++++++++++++++++++++++++++++++++++++++
 tests/generic/603.out |  41 +++++++++
 tests/generic/group   |   1 +
 4 files changed, 248 insertions(+)
 create mode 100755 tests/generic/603
 create mode 100644 tests/generic/603.out
common/quota +4 -0
index 240e0bbc..1437d5f7 100644
@@ -217,6 +217,10 @@ _qmount()
     if [ "$FSTYP" != "xfs" ]; then
         quotacheck -ug $SCRATCH_MNT >>$seqres.full 2>&1
         quotaon -ug $SCRATCH_MNT >>$seqres.full 2>&1
+        # try to turn on project quota if it's supported
+        if quotaon --help 2>&1 | grep -q '\-\-project'; then
+            quotaon --project $SCRATCH_MNT >>$seqres.full 2>&1
+        fi
     fi
     chmod ugo+rwx $SCRATCH_MNT
 }
tests/generic/603 new file +202 -0

202 lines not on this page · raw message

tests/generic/603.out new file +41 -0

41 lines not on this page · raw message

tests/generic/group +1 -0
index d9ab9a31..b1b1bd07 100644
@@ -605,3 +605,4 @@
 600 auto quick quota
 601 auto quick quota
 602 auto quick encrypt
+603 auto quick quota
Signature · 1 line
2.20.1