From b564103965dff72f8fd7bf558d70fe6f2a4f80f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 17 Aug 2024 05:35:20 +0000 Subject: [PATCH] fix(deps): update module github.com/longhorn/longhorn-engine to v1.7.0-rc4 --- go.mod | 6 +++--- go.sum | 12 ++++++------ .../longhorn-engine/pkg/replica/diff_disk.go | 9 +++++++-- .../longhorn/longhorn-engine/pkg/replica/extents.go | 5 ----- .../longhorn/longhorn-engine/pkg/replica/replica.go | 8 +++++--- vendor/modules.txt | 6 +++--- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 032c34dde..20e66afa7 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e github.com/longhorn/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c - github.com/longhorn/longhorn-engine v1.7.0-rc3 + github.com/longhorn/longhorn-engine v1.7.0-rc4 github.com/longhorn/longhorn-spdk-engine v0.0.0-20240815033436-41791a2d0239 github.com/longhorn/types v0.0.0-20240725040629-473d671316c4 github.com/pkg/errors v0.9.1 @@ -54,9 +54,9 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/longhorn/go-iscsi-helper v0.0.0-20240727052644-d2442a50e906 // indirect + github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 // indirect github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003 // indirect - github.com/longhorn/sparse-tools v0.0.0-20240703010727-92451e38077a // indirect + github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect diff --git a/go.sum b/go.sum index a8ce5888d..ff260b6cb 100644 --- a/go.sum +++ b/go.sum @@ -95,18 +95,18 @@ github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f h1:VBXKJ+BJoq github.com/longhorn/backupstore v0.0.0-20240811043357-5c2b7879457f/go.mod h1:U02ktOpAMSejR4vUztX2zt/78btYsUICDH5AipTddu4= github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e h1:cmns0zh6HMocqH7tnjFrgI8mf/h1i0bbnLznWfjQ63k= github.com/longhorn/go-common-libs v0.0.0-20240811024046-b6ddc3efb72e/go.mod h1:Yrq49KPpchy++7Z15GrMKPkiwr5IduPboLTL99a1TGA= -github.com/longhorn/go-iscsi-helper v0.0.0-20240727052644-d2442a50e906 h1:1FoEoyIQRtKAKv3O8MJ1nczly3+WMzbFbjT3pmakpWw= -github.com/longhorn/go-iscsi-helper v0.0.0-20240727052644-d2442a50e906/go.mod h1:/VLElLs6+hjmkY7VQn92W8MO56HVvLJUSNBQitOB0fY= +github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 h1:fzLAnCLCecoUnsSYyyo7li5GD17xckyBl/zietxz168= +github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58/go.mod h1:TobRDCXmF0Ni+jz6+nLJamw3uVu+gNDZoZre1JczGwc= github.com/longhorn/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c h1:ztjrkxi7KcZPZBexnSKBZ2fX75JIU+iXibXeq8qpeg4= github.com/longhorn/go-spdk-helper v0.0.0-20240811121608-9383fa59dd7c/go.mod h1:BrtXoVnIZ97+uZ+cMcaICc5KnuJkh8j3+G1NjKxh+8Q= -github.com/longhorn/longhorn-engine v1.7.0-rc3 h1:YTt++OeSrEOlifz++8VAOH/aJ4lGShD2TaJP1ZaQ3Uw= -github.com/longhorn/longhorn-engine v1.7.0-rc3/go.mod h1:2Hq/3QzW4fF2yUg+kauiAT3ps5WCKLMkrwXW2Wyfj9o= +github.com/longhorn/longhorn-engine v1.7.0-rc4 h1:m+IUTSwkCLXZABPzxH1NjX2P3FJv/Yg0cP5nLS2tvns= +github.com/longhorn/longhorn-engine v1.7.0-rc4/go.mod h1:doPP8g43e2PusQPnVLUsW/OdCadqTAZAMIFEOWowSA4= github.com/longhorn/longhorn-spdk-engine v0.0.0-20240815033436-41791a2d0239 h1:1bHRQ6MYz4z3ul614ZGFjcT9EdeIUtUYKBi/Qjg5dHc= github.com/longhorn/longhorn-spdk-engine v0.0.0-20240815033436-41791a2d0239/go.mod h1:4X7OQr01G10WSxq0ETEFxS/gQvgcE3YUEIU3MZujTcc= github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003 h1:Jw9uANsGcHTxp6HcC++/vN17LfeuDmozHI2j6DoZf5E= github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003/go.mod h1:0CLeXlf59Lg6C0kjLSDf47ft73Dh37CwymYRKWwAn04= -github.com/longhorn/sparse-tools v0.0.0-20240703010727-92451e38077a h1:+o63c0oh7ZNKeQdc0Hawfzz5vRa4LiDvLOtJYjegtnk= -github.com/longhorn/sparse-tools v0.0.0-20240703010727-92451e38077a/go.mod h1:iUJCZtOKG/9xv2rfrUAYZntFTzP5dZtvy4Kwe6dMcUc= +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/types v0.0.0-20240725040629-473d671316c4 h1:L2g0sIJ2fXt4BSFRYNnF6ObtKryCUFm9qLcCXHWssCk= github.com/longhorn/types v0.0.0-20240725040629-473d671316c4/go.mod h1:KlJuZB8NfHchWshYxYgV9pPIxBKC04Vq05G2TfgMf7w= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go index 1134a7fad..4be04ff13 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/diff_disk.go @@ -20,7 +20,7 @@ type diffDisk struct { // we don't know the location yet. location []byte // list of files in grandparent, parent, child, etc order. - // index 0 is nil or backing file and index n-1 is the active write layer + // index 0 is nil, index 1 is backing file, and index n-1 is the active write layer files []types.DiffDisk sectorSize int64 // current size of the head file. @@ -372,12 +372,17 @@ func (d *diffDisk) initializeSectorLocation(value byte) { } } -func (d *diffDisk) preload() error { +func (d *diffDisk) preload(isThereBackingFile bool) error { for i, f := range d.files { if i == 0 { continue } + // Skip loading the backingFile if it exists + if i == int(backingFileIndex) && isThereBackingFile { + continue + } + if err := LoadDiffDiskLocationList(d, f, byte(i)); err != nil { return err } diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go index 697f92a24..a82325fe8 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/extents.go @@ -11,11 +11,6 @@ const MaxExtentsBuffer = 1024 func LoadDiffDiskLocationList(diffDisk *diffDisk, disk types.DiffDisk, currentFileIndex byte) error { fd := disk.Fd() - // The backing file will have a Fd of 0 - if fd == 0 { - return nil - } - start := uint64(0) end := uint64(len(diffDisk.location)) * uint64(diffDisk.sectorSize) for { diff --git a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go index 815b9bbcd..ab836a8ff 100644 --- a/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go +++ b/vendor/github.com/longhorn/longhorn-engine/pkg/replica/replica.go @@ -920,8 +920,9 @@ func (r *Replica) createDisk(name string, userCreated bool, created string, labe rollbackFuncList := []func() error{} defer func() { if err == nil { - err = r.rmDisk(oldHead) - logrus.WithError(err).Errorf("Failed to remove old head %v", oldHead) + if errRm := r.rmDisk(oldHead); errRm != nil { + logrus.WithError(errRm).Warnf("Failed to remove old head %v", oldHead) + } return } @@ -1467,7 +1468,8 @@ func (r *Replica) Preload(includeBackingFileLayer bool) error { } else { r.volume.initializeSectorLocation(nilFileIndex) } - return r.volume.preload() + isThereBackingFile := r.info.BackingFile != nil + return r.volume.preload(isThereBackingFile) } func (r *Replica) GetDataLayout(ctx context.Context) (<-chan sparse.FileInterval, <-chan error, error) { diff --git a/vendor/modules.txt b/vendor/modules.txt index 39acd9722..77013f341 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -201,7 +201,7 @@ github.com/longhorn/go-common-libs/sync github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/go-iscsi-helper v0.0.0-20240727052644-d2442a50e906 +# github.com/longhorn/go-iscsi-helper v0.0.0-20240811043302-df8de353dd58 ## explicit; go 1.22.0 github.com/longhorn/go-iscsi-helper/iscsi github.com/longhorn/go-iscsi-helper/iscsidev @@ -217,7 +217,7 @@ github.com/longhorn/go-spdk-helper/pkg/spdk/setup github.com/longhorn/go-spdk-helper/pkg/spdk/types github.com/longhorn/go-spdk-helper/pkg/types github.com/longhorn/go-spdk-helper/pkg/util -# github.com/longhorn/longhorn-engine v1.7.0-rc3 +# github.com/longhorn/longhorn-engine v1.7.0-rc4 ## explicit; go 1.22.2 github.com/longhorn/longhorn-engine/pkg/backingfile github.com/longhorn/longhorn-engine/pkg/controller/client @@ -246,7 +246,7 @@ github.com/longhorn/longhorn-spdk-engine/pkg/util/broadcaster # github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003 ## explicit github.com/longhorn/nsfilelock -# github.com/longhorn/sparse-tools v0.0.0-20240703010727-92451e38077a +# github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff ## explicit; go 1.22.0 github.com/longhorn/sparse-tools/sparse github.com/longhorn/sparse-tools/types