瀏覽代碼

Merge pull request #46854 from thaJeztah/quota_update_size

quota: increase sparse test-image to 300MB
Sebastiaan van Stijn 1 年之前
父節點
當前提交
2ef69899de
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      quota/testhelpers.go

+ 6 - 2
quota/testhelpers.go

@@ -10,8 +10,6 @@ import (
 	"golang.org/x/sys/unix"
 	"golang.org/x/sys/unix"
 )
 )
 
 
-const imageSize = 64 * 1024 * 1024
-
 // CanTestQuota - checks if xfs prjquota can be tested
 // CanTestQuota - checks if xfs prjquota can be tested
 // returns a reason if not
 // returns a reason if not
 func CanTestQuota() (string, bool) {
 func CanTestQuota() (string, bool) {
@@ -28,6 +26,12 @@ func CanTestQuota() (string, bool) {
 // PrepareQuotaTestImage - prepares an xfs prjquota test image
 // PrepareQuotaTestImage - prepares an xfs prjquota test image
 // returns the path the the image on success
 // returns the path the the image on success
 func PrepareQuotaTestImage(t *testing.T) (string, error) {
 func PrepareQuotaTestImage(t *testing.T) (string, error) {
+	// imageSize is the size of the test-image. The minimum size allowed
+	// is 300MB.
+	//
+	// See https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=6e0ed3d19c54603f0f7d628ea04b550151d8a262
+	const imageSize = 300 * 1024 * 1024
+
 	mkfs, err := exec.LookPath("mkfs.xfs")
 	mkfs, err := exec.LookPath("mkfs.xfs")
 	if err != nil {
 	if err != nil {
 		return "", err
 		return "", err