From 7dac25a3a9725f627c3e457764ef4c115b5db2a8 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 23 Aug 2021 09:58:10 -0700 Subject: [PATCH] vendor: update tar-split to v0.11.2 Signed-off-by: Tonis Tiigi (cherry picked from commit 21faae85ee8ecb4730e97083dd8605ae9534227e) Signed-off-by: Sebastiaan van Stijn --- vendor.conf | 2 +- vendor/github.com/vbatts/tar-split/go.mod | 8 ++++++++ vendor/github.com/vbatts/tar-split/tar/storage/getter.go | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 vendor/github.com/vbatts/tar-split/go.mod diff --git a/vendor.conf b/vendor.conf index ab00d90928723..bf5afdcc905ed 100644 --- a/vendor.conf +++ b/vendor.conf @@ -79,7 +79,7 @@ github.com/modern-go/reflect2 94122c33edd36123c84d5368cfb2 # get graph and distribution packages github.com/docker/distribution b5ca020cfbe998e5af3457fda087444cf5116496 # v2.8.1 -github.com/vbatts/tar-split 620714a4c508c880ac1bdda9c8370a2b19af1a55 # v0.11.1 +github.com/vbatts/tar-split 80a436fd6164c557b131f7c59ed69bd81af69761 # v0.11.2 github.com/opencontainers/go-digest ea51bea511f75cfa3ef6098cc253c5c3609b037a # v1.0.0 # get go-zfs packages diff --git a/vendor/github.com/vbatts/tar-split/go.mod b/vendor/github.com/vbatts/tar-split/go.mod new file mode 100644 index 0000000000000..4e934b5c3ada4 --- /dev/null +++ b/vendor/github.com/vbatts/tar-split/go.mod @@ -0,0 +1,8 @@ +module github.com/vbatts/tar-split + +go 1.15 + +require ( + github.com/sirupsen/logrus v1.7.0 + github.com/urfave/cli v1.22.4 +) diff --git a/vendor/github.com/vbatts/tar-split/tar/storage/getter.go b/vendor/github.com/vbatts/tar-split/tar/storage/getter.go index ae11f8ffd4e8f..9fed24aa8983b 100644 --- a/vendor/github.com/vbatts/tar-split/tar/storage/getter.go +++ b/vendor/github.com/vbatts/tar-split/tar/storage/getter.go @@ -92,11 +92,12 @@ func NewDiscardFilePutter() FilePutter { } type bitBucketFilePutter struct { + buffer [32 * 1024]byte // 32 kB is the buffer size currently used by io.Copy, as of August 2021. } func (bbfp *bitBucketFilePutter) Put(name string, r io.Reader) (int64, []byte, error) { c := crc64.New(CRCTable) - i, err := io.Copy(c, r) + i, err := io.CopyBuffer(c, r, bbfp.buffer[:]) return i, c.Sum(nil), err }