From 767727480f2856440cc908be7c9296dccb93346c Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 17 Oct 2016 17:27:24 -0700 Subject: [PATCH] move graphdriver/projectquota.go to its own package. Signed-off-by: Daniel Nephin --- daemon/graphdriver/overlay2/overlay.go | 7 ++++--- daemon/graphdriver/{ => quota}/projectquota.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) rename daemon/graphdriver/{ => quota}/projectquota.go (99%) diff --git a/daemon/graphdriver/overlay2/overlay.go b/daemon/graphdriver/overlay2/overlay.go index 0076f3161f..8310323f2f 100644 --- a/daemon/graphdriver/overlay2/overlay.go +++ b/daemon/graphdriver/overlay2/overlay.go @@ -17,6 +17,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/daemon/graphdriver" + "github.com/docker/docker/daemon/graphdriver/quota" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/docker/pkg/directory" @@ -79,7 +80,7 @@ const ( type overlayOptions struct { 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. @@ -88,7 +89,7 @@ type Driver struct { uidMaps []idtools.IDMap gidMaps []idtools.IDMap ctr *graphdriver.RefCounter - quotaCtl *graphdriver.QuotaCtl + quotaCtl *quota.QuotaCtl options overlayOptions } @@ -163,7 +164,7 @@ func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (grap if backingFs == "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 } } diff --git a/daemon/graphdriver/projectquota.go b/daemon/graphdriver/quota/projectquota.go similarity index 99% rename from daemon/graphdriver/projectquota.go rename to daemon/graphdriver/quota/projectquota.go index e2004b950f..ed44b0b50d 100644 --- a/daemon/graphdriver/projectquota.go +++ b/daemon/graphdriver/quota/projectquota.go @@ -9,7 +9,7 @@ // for both xfs/ext4 for kernel version >= v4.5 // -package graphdriver +package quota /* #include