vendor: github.com/containerd/continuity v0.4.2
full diff: https://github.com/containerd/continuity/compare/v0.4.1...v0.4.2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6d93db06db
commit
bd6cadffb0
10 changed files with 15 additions and 84 deletions
|
@ -27,7 +27,7 @@ require (
|
|||
github.com/container-orchestrated-devices/container-device-interface v0.6.1
|
||||
github.com/containerd/cgroups/v3 v3.0.2
|
||||
github.com/containerd/containerd v1.6.24
|
||||
github.com/containerd/continuity v0.4.1
|
||||
github.com/containerd/continuity v0.4.2
|
||||
github.com/containerd/fifo v1.1.0
|
||||
github.com/containerd/typeurl/v2 v2.1.1
|
||||
github.com/coreos/go-systemd/v22 v22.5.0
|
||||
|
|
|
@ -367,8 +367,8 @@ github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cE
|
|||
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
|
||||
github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ=
|
||||
github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM=
|
||||
github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU=
|
||||
github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
|
||||
github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM=
|
||||
github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
|
||||
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||
github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
|
||||
|
|
4
vendor/github.com/containerd/continuity/devices/mknod_freebsd.go
generated
vendored
4
vendor/github.com/containerd/continuity/devices/mknod_freebsd.go
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//go:build freebsd
|
||||
// +build freebsd
|
||||
//go:build freebsd || dragonfly
|
||||
// +build freebsd dragonfly
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
|
4
vendor/github.com/containerd/continuity/driver/lchmod_unix.go
generated
vendored
4
vendor/github.com/containerd/continuity/driver/lchmod_unix.go
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//go:build darwin || freebsd || netbsd || openbsd || solaris
|
||||
// +build darwin freebsd netbsd openbsd solaris
|
||||
//go:build darwin || freebsd || netbsd || openbsd || dragonfly || solaris
|
||||
// +build darwin freebsd netbsd openbsd dragonfly solaris
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
|
12
vendor/github.com/containerd/continuity/fs/copy.go
generated
vendored
12
vendor/github.com/containerd/continuity/fs/copy.go
generated
vendored
|
@ -18,20 +18,13 @@ package fs
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var bufferPool = &sync.Pool{
|
||||
New: func() interface{} {
|
||||
buffer := make([]byte, 32*1024)
|
||||
return &buffer
|
||||
},
|
||||
}
|
||||
|
||||
// XAttrErrorHandler transform a non-nil xattr error.
|
||||
// Return nil to ignore an error.
|
||||
// xattrKey can be empty for listxattr operation.
|
||||
|
@ -199,5 +192,6 @@ func openAndCopyFile(target, source string) error {
|
|||
}
|
||||
defer tgt.Close()
|
||||
|
||||
return copyFileContent(tgt, src)
|
||||
_, err = io.Copy(tgt, src)
|
||||
return err
|
||||
}
|
||||
|
|
46
vendor/github.com/containerd/continuity/fs/copy_linux.go
generated
vendored
46
vendor/github.com/containerd/continuity/fs/copy_linux.go
generated
vendored
|
@ -18,7 +18,6 @@ package fs
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
|
@ -62,51 +61,6 @@ func copyFileInfo(fi os.FileInfo, src, name string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
const maxSSizeT = int64(^uint(0) >> 1)
|
||||
|
||||
func copyFileContent(dst, src *os.File) error {
|
||||
st, err := src.Stat()
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to stat source: %w", err)
|
||||
}
|
||||
|
||||
size := st.Size()
|
||||
first := true
|
||||
srcFd := int(src.Fd())
|
||||
dstFd := int(dst.Fd())
|
||||
|
||||
for size > 0 {
|
||||
// Ensure that we are never trying to copy more than SSIZE_MAX at a
|
||||
// time and at the same time avoids overflows when the file is larger
|
||||
// than 4GB on 32-bit systems.
|
||||
var copySize int
|
||||
if size > maxSSizeT {
|
||||
copySize = int(maxSSizeT)
|
||||
} else {
|
||||
copySize = int(size)
|
||||
}
|
||||
n, err := unix.CopyFileRange(srcFd, nil, dstFd, nil, copySize, 0)
|
||||
if err != nil {
|
||||
if (err != unix.ENOSYS && err != unix.EXDEV) || !first {
|
||||
return fmt.Errorf("copy file range failed: %w", err)
|
||||
}
|
||||
|
||||
buf := bufferPool.Get().(*[]byte)
|
||||
_, err = io.CopyBuffer(dst, src, *buf)
|
||||
bufferPool.Put(buf)
|
||||
if err != nil {
|
||||
return fmt.Errorf("userspace copy failed: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
first = false
|
||||
size -= int64(n)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func copyXAttrs(dst, src string, excludes map[string]struct{}, errorHandler XAttrErrorHandler) error {
|
||||
xattrKeys, err := sysx.LListxattr(src)
|
||||
if err != nil {
|
||||
|
|
13
vendor/github.com/containerd/continuity/fs/copy_unix.go
generated
vendored
13
vendor/github.com/containerd/continuity/fs/copy_unix.go
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//go:build darwin || freebsd || openbsd || netbsd || solaris
|
||||
// +build darwin freebsd openbsd netbsd solaris
|
||||
//go:build darwin || freebsd || openbsd || netbsd || dragonfly || solaris
|
||||
// +build darwin freebsd openbsd netbsd dragonfly solaris
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
@ -21,7 +21,6 @@ package fs
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
@ -61,14 +60,6 @@ func copyFileInfo(fi os.FileInfo, src, name string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func copyFileContent(dst, src *os.File) error {
|
||||
buf := bufferPool.Get().(*[]byte)
|
||||
_, err := io.CopyBuffer(dst, src, *buf)
|
||||
bufferPool.Put(buf)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func copyXAttrs(dst, src string, excludes map[string]struct{}, errorHandler XAttrErrorHandler) error {
|
||||
xattrKeys, err := sysx.LListxattr(src)
|
||||
if err != nil {
|
||||
|
|
8
vendor/github.com/containerd/continuity/fs/copy_windows.go
generated
vendored
8
vendor/github.com/containerd/continuity/fs/copy_windows.go
generated
vendored
|
@ -19,7 +19,6 @@ package fs
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
winio "github.com/Microsoft/go-winio"
|
||||
|
@ -72,13 +71,6 @@ func copyFileInfo(fi os.FileInfo, src, name string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func copyFileContent(dst, src *os.File) error {
|
||||
buf := bufferPool.Get().(*[]byte)
|
||||
_, err := io.CopyBuffer(dst, src, *buf)
|
||||
bufferPool.Put(buf)
|
||||
return err
|
||||
}
|
||||
|
||||
func copyXAttrs(dst, src string, excludes map[string]struct{}, errorHandler XAttrErrorHandler) error {
|
||||
return nil
|
||||
}
|
||||
|
|
4
vendor/github.com/containerd/continuity/fs/stat_atim.go
generated
vendored
4
vendor/github.com/containerd/continuity/fs/stat_atim.go
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
//go:build linux || openbsd || solaris
|
||||
// +build linux openbsd solaris
|
||||
//go:build linux || openbsd || dragonfly || solaris
|
||||
// +build linux openbsd dragonfly solaris
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -322,7 +322,7 @@ github.com/containerd/containerd/sys
|
|||
github.com/containerd/containerd/sys/reaper
|
||||
github.com/containerd/containerd/tracing
|
||||
github.com/containerd/containerd/version
|
||||
# github.com/containerd/continuity v0.4.1
|
||||
# github.com/containerd/continuity v0.4.2
|
||||
## explicit; go 1.19
|
||||
github.com/containerd/continuity/devices
|
||||
github.com/containerd/continuity/driver
|
||||
|
|
Loading…
Add table
Reference in a new issue