Skip to content

Commit f2970e5

Browse files
committed
pkg/containerfs: move to internal
The only external consumer are the `graphdriver` and `graphdriver/shim` packages in github.com/docker/go-plugins-helpers, which depended on [ContainerFS][1], which was removed in 9ce2b30. graphdriver-plugins were deprecated in 6da604a, and support for them removed in 555dac5, so removing this should not be an issue. Ideally this package would've been moved inside `daemon/internal`, but it's used by the `daemon` (cleanupContainer), `plugin` package, and by `graphdrivers`, so needs to be in the top-level `internal/` package. [1]: https://github.com/docker/go-plugins-helpers/blob/6eecb7beb65124bb44a23848bb46e98b4f50ae18/graphdriver/api.go#L218 Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent a3e6ce9 commit f2970e5

12 files changed

Lines changed: 10 additions & 8 deletions

File tree

daemon/delete.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/docker/docker/container"
1818
"github.com/docker/docker/daemon/config"
1919
"github.com/docker/docker/errdefs"
20-
"github.com/docker/docker/pkg/containerfs"
20+
"github.com/docker/docker/internal/containerfs"
2121
"github.com/opencontainers/selinux/go-selinux"
2222
"github.com/pkg/errors"
2323
)
@@ -161,6 +161,8 @@ func (daemon *Daemon) cleanupContainer(container *container.Container, config ba
161161
// so that other goroutines don't attempt to concurrently open files
162162
// within it. Having any file open on Windows (without the
163163
// FILE_SHARE_DELETE flag) will block it from being deleted.
164+
//
165+
// TODO(thaJeztah): should this be moved to the "container" itself, or possibly be delegated to the graphdriver or snapshotter?
164166
container.Lock()
165167
err := containerfs.EnsureRemoveAll(container.Root)
166168
container.Unlock()

daemon/graphdriver/btrfs/btrfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/containerd/containerd/pkg/userns"
3838
"github.com/containerd/log"
3939
"github.com/docker/docker/daemon/graphdriver"
40-
"github.com/docker/docker/pkg/containerfs"
40+
"github.com/docker/docker/internal/containerfs"
4141
"github.com/docker/docker/pkg/idtools"
4242
"github.com/docker/docker/pkg/parsers"
4343
units "github.com/docker/go-units"

daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import (
1717
"github.com/containerd/log"
1818
"github.com/docker/docker/daemon/graphdriver"
1919
"github.com/docker/docker/daemon/graphdriver/overlayutils"
20+
"github.com/docker/docker/internal/containerfs"
2021
"github.com/docker/docker/pkg/archive"
2122
"github.com/docker/docker/pkg/chrootarchive"
22-
"github.com/docker/docker/pkg/containerfs"
2323
"github.com/docker/docker/pkg/directory"
2424
"github.com/docker/docker/pkg/idtools"
2525
"github.com/docker/docker/pkg/parsers/kernel"

daemon/graphdriver/overlay2/overlay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
"github.com/containerd/log"
2020
"github.com/docker/docker/daemon/graphdriver"
2121
"github.com/docker/docker/daemon/graphdriver/overlayutils"
22+
"github.com/docker/docker/internal/containerfs"
2223
"github.com/docker/docker/pkg/archive"
2324
"github.com/docker/docker/pkg/chrootarchive"
24-
"github.com/docker/docker/pkg/containerfs"
2525
"github.com/docker/docker/pkg/directory"
2626
"github.com/docker/docker/pkg/idtools"
2727
"github.com/docker/docker/pkg/ioutils"

daemon/graphdriver/vfs/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/docker/docker/daemon/graphdriver"
99
"github.com/docker/docker/errdefs"
10-
"github.com/docker/docker/pkg/containerfs"
10+
"github.com/docker/docker/internal/containerfs"
1111
"github.com/docker/docker/pkg/idtools"
1212
"github.com/docker/docker/pkg/parsers"
1313
"github.com/docker/docker/quota"

plugin/backend_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ import (
2929
"github.com/docker/docker/api/types/registry"
3030
"github.com/docker/docker/dockerversion"
3131
"github.com/docker/docker/errdefs"
32+
"github.com/docker/docker/internal/containerfs"
3233
"github.com/docker/docker/pkg/authorization"
3334
"github.com/docker/docker/pkg/chrootarchive"
34-
"github.com/docker/docker/pkg/containerfs"
3535
"github.com/docker/docker/pkg/pools"
3636
"github.com/docker/docker/pkg/progress"
3737
"github.com/docker/docker/pkg/stringid"

0 commit comments

Comments
 (0)