فهرست منبع

move graphdriver/projectquota.go to its own package.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Daniel Nephin 8 سال پیش
والد
کامیت
767727480f
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 4 3
      daemon/graphdriver/overlay2/overlay.go
  2. 1 1
      daemon/graphdriver/quota/projectquota.go

+ 4 - 3
daemon/graphdriver/overlay2/overlay.go

@@ -17,6 +17,7 @@ import (
 	"github.com/Sirupsen/logrus"
 	"github.com/Sirupsen/logrus"
 
 
 	"github.com/docker/docker/daemon/graphdriver"
 	"github.com/docker/docker/daemon/graphdriver"
+	"github.com/docker/docker/daemon/graphdriver/quota"
 	"github.com/docker/docker/pkg/archive"
 	"github.com/docker/docker/pkg/archive"
 	"github.com/docker/docker/pkg/chrootarchive"
 	"github.com/docker/docker/pkg/chrootarchive"
 	"github.com/docker/docker/pkg/directory"
 	"github.com/docker/docker/pkg/directory"
@@ -79,7 +80,7 @@ const (
 
 
 type overlayOptions struct {
 type overlayOptions struct {
 	overrideKernelCheck bool
 	overrideKernelCheck bool
-	quota               graphdriver.Quota
+	quota               quota.Quota
 }
 }
 
 
 // Driver contains information about the home directory and the list of active mounts that are created using this driver.
 // Driver contains information about the home directory and the list of active mounts that are created using this driver.
@@ -88,7 +89,7 @@ type Driver struct {
 	uidMaps  []idtools.IDMap
 	uidMaps  []idtools.IDMap
 	gidMaps  []idtools.IDMap
 	gidMaps  []idtools.IDMap
 	ctr      *graphdriver.RefCounter
 	ctr      *graphdriver.RefCounter
-	quotaCtl *graphdriver.QuotaCtl
+	quotaCtl *quota.QuotaCtl
 	options  overlayOptions
 	options  overlayOptions
 }
 }
 
 
@@ -163,7 +164,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap
 
 
 	if backingFs == "xfs" {
 	if backingFs == "xfs" {
 		// Try to enable project quota support over xfs.
 		// Try to enable project quota support over xfs.
-		if d.quotaCtl, err = graphdriver.NewQuotaCtl(home); err == nil {
+		if d.quotaCtl, err = quota.NewQuotaCtl(home); err == nil {
 			projectQuotaSupported = true
 			projectQuotaSupported = true
 		}
 		}
 	}
 	}

+ 1 - 1
daemon/graphdriver/projectquota.go → daemon/graphdriver/quota/projectquota.go

@@ -9,7 +9,7 @@
 //       for both xfs/ext4 for kernel version >= v4.5
 //       for both xfs/ext4 for kernel version >= v4.5
 //
 //
 
 
-package graphdriver
+package quota
 
 
 /*
 /*
 #include <stdlib.h>
 #include <stdlib.h>