diff --git a/go.mod b/go.mod index 6f470a87..adec4a2d 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 github.com/longhorn/longhorn-engine v1.5.5 - github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff + github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/urfave/cli v1.22.15 diff --git a/go.sum b/go.sum index aa2efbef..4317d704 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/longhorn/longhorn-engine v1.5.5 h1:44p9Iyp4boKSHgMAl8iD4nY/EQRnF/e7hPSmqqIqvIk= github.com/longhorn/longhorn-engine v1.5.5/go.mod h1:/QEAmYu1ZNsKR22d8wdqssbz1ja7Yyj/GyPu8BYkTEk= -github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff h1:gmdQDbnaGJ/zmrK+QJzSys8mH679os6i7vW/pOpRn1U= -github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff/go.mod h1:iUJCZtOKG/9xv2rfrUAYZntFTzP5dZtvy4Kwe6dMcUc= +github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d h1:iNrrGcE9TLcaayQgOkdEZDvlzKCWMNhXXJD2d2K4Wyo= +github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d/go.mod h1:iUJCZtOKG/9xv2rfrUAYZntFTzP5dZtvy4Kwe6dMcUc= github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/file.go b/vendor/github.com/longhorn/sparse-tools/sparse/file.go index 187f13a4..17624bd6 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/file.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/file.go @@ -347,7 +347,7 @@ func GetFiemapRegionExts(file FileIoProcessor, interval Interval, extCount int) _, exts, errno := file.GetFieMap().FiemapRegion(uint32(extCount), uint64(interval.Begin), uint64(interval.End-interval.Begin)) if errno != 0 { log.Error("Failed to call fiemap.Fiemap(extCount)") - return exts, fmt.Errorf(errno.Error()) + return exts, fmt.Errorf("%v", errno) } log.Tracef("Retrieved %v/%v extents from file %v, interval %+v, elapsed %.2fs", diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go b/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go index cfdfe80e..480e59da 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go @@ -64,7 +64,7 @@ func coalesce(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops Fil defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops) diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go b/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go index 773d0af0..3940b51c 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go @@ -60,7 +60,7 @@ func prune(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops FileHa defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops) diff --git a/vendor/modules.txt b/vendor/modules.txt index 315b2786..110be38c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,7 +36,7 @@ github.com/longhorn/longhorn-engine/pkg/replica/client github.com/longhorn/longhorn-engine/pkg/types github.com/longhorn/longhorn-engine/pkg/util github.com/longhorn/longhorn-engine/proto/ptypes -# github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff +# github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d ## explicit; go 1.22.0 github.com/longhorn/sparse-tools/sparse github.com/longhorn/sparse-tools/sparse/rest