diff --git a/plugins/snapshots/blockfile/blockfile.go b/plugins/snapshots/blockfile/blockfile.go index 2d44c2d90c..17e22a7071 100644 --- a/plugins/snapshots/blockfile/blockfile.go +++ b/plugins/snapshots/blockfile/blockfile.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" "runtime" + "slices" "github.com/containerd/containerd/v2/core/mount" "github.com/containerd/containerd/v2/core/snapshots" @@ -160,6 +161,10 @@ func NewSnapshotter(root string, opts ...Opt) (snapshots.Snapshotter, error) { config.mountOptions = []string{"loop"} } + if !slices.Contains(config.mountOptions, "loop") { + config.mountOptions = append(config.mountOptions, "loop") + } + ms, err := storage.NewMetaStore(filepath.Join(root, "metadata.db")) if err != nil { return nil, err