From f2dc4f54e76317654fbc0f16e518b7033f36611a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 01:01:48 +0000 Subject: [PATCH] fix(deps): update patch digest dependencies --- go.mod | 4 +- go.sum | 8 ++-- .../go-spdk-helper/pkg/spdk/client/basic.go | 38 +++++++++++++++++++ .../go-spdk-helper/pkg/spdk/types/lvol.go | 12 ++++++ vendor/modules.txt | 4 +- 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 2a0f43cf..a4a28106 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/0xPolygon/polygon-edge v1.3.3 github.com/google/uuid v1.6.0 github.com/longhorn/backupstore v0.0.0-20241217122650-1663643255d4 - github.com/longhorn/go-common-libs v0.0.0-20241217111348-5bad87d5320c - github.com/longhorn/go-spdk-helper v0.0.0-20241216160651-bcce92add55b + github.com/longhorn/go-common-libs v0.0.0-20241217170247-b8a12cee7f65 + github.com/longhorn/go-spdk-helper v0.0.0-20241217191337-f66a0cd93fc3 github.com/longhorn/types v0.0.0-20241217083824-2e0ecb487ccf github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index 01ce9e55..54904439 100644 --- a/go.sum +++ b/go.sum @@ -51,10 +51,10 @@ 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/backupstore v0.0.0-20241217122650-1663643255d4 h1:MPk0aIH0/4EmY/R7woFwwsizrLf5/+7zabYRM6co+V0= github.com/longhorn/backupstore v0.0.0-20241217122650-1663643255d4/go.mod h1:3pMkWpVfbU2Z3p8oqMWX7FgQ73ofVmqFywpgMeYnWPI= -github.com/longhorn/go-common-libs v0.0.0-20241217111348-5bad87d5320c h1:qXRkKpEGxGIh2MTdAgorC8oRV4M3OFIa4sizGbEUh0U= -github.com/longhorn/go-common-libs v0.0.0-20241217111348-5bad87d5320c/go.mod h1:vEMkfH4afJwzmK6Q1hd7bKin7du2zdV8eVsdfONozOA= -github.com/longhorn/go-spdk-helper v0.0.0-20241216160651-bcce92add55b h1:fzyWJOiUPzwkY/VShltuhP6eUpkv6RMFqSVuVFt/Z2M= -github.com/longhorn/go-spdk-helper v0.0.0-20241216160651-bcce92add55b/go.mod h1:6AU48wPwQKOJWt0M0k5KYNYH3GRtsckkwjUOASBFsd0= +github.com/longhorn/go-common-libs v0.0.0-20241217170247-b8a12cee7f65 h1:8lLw5EGeU3roroeg+fN6B2LCnm0Z425tWpwbA8vzmZk= +github.com/longhorn/go-common-libs v0.0.0-20241217170247-b8a12cee7f65/go.mod h1:LiwSR56HRbeCok7CXYUO3lOwgAW7Spg73qIkM3ZyTJw= +github.com/longhorn/go-spdk-helper v0.0.0-20241217191337-f66a0cd93fc3 h1:3QWEVKJLSHOek6pX8+DJEiXAeGNuwR9+9t8UeR37Qdo= +github.com/longhorn/go-spdk-helper v0.0.0-20241217191337-f66a0cd93fc3/go.mod h1:6AU48wPwQKOJWt0M0k5KYNYH3GRtsckkwjUOASBFsd0= github.com/longhorn/types v0.0.0-20241217083824-2e0ecb487ccf h1:7TFVWpGl0MB9osrliT+j6+Jdr1cAuR/U2noPx0H9yYY= github.com/longhorn/types v0.0.0-20241217083824-2e0ecb487ccf/go.mod h1:3jHuVDtpkXQzpnp4prguDBskVRric2kmF8aSPkRJ4jw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= diff --git a/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go b/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go index bbd5bae8..0d6f9776 100644 --- a/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go +++ b/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/client/basic.go @@ -502,6 +502,44 @@ func (c *Client) BdevLvolGetFragmap(name string, offset, size uint64) (*spdktype return &result, nil } +// BdevLvolRegisterSnapshotChecksum compute and store checksum of snapshot's data. Overwrite old checksum if already registered. +// +// "name": Required. UUID or alias of the snapshot. The alias of a snapshot is /. +func (c *Client) BdevLvolRegisterSnapshotChecksum(name string) (registered bool, err error) { + req := spdktypes.BdevLvolRegisterSnapshotChecksumRequest{ + Name: name, + } + + cmdOutput, err := c.jsonCli.SendCommandWithLongTimeout("bdev_lvol_register_snapshot_checksum", req) + if err != nil { + return false, err + } + + return registered, json.Unmarshal(cmdOutput, ®istered) +} + +// BdevLvolGetSnapshotChecksum gets snapshot's stored checksum. The checksum must has been previously registered. +// +// "name": Required. UUID or alias of the snapshot. The alias of a snapshot is /. +func (c *Client) BdevLvolGetSnapshotChecksum(name string) (checksum *uint64, err error) { + req := spdktypes.BdevLvolGetSnapshotChecksumRequest{ + Name: name, + } + + cmdOutput, err := c.jsonCli.SendCommandWithLongTimeout("bdev_lvol_get_snapshot_checksum", req) + if err != nil { + return nil, err + } + + var snapshotChecksum spdktypes.BdevLvolSnapshotChecksum + err = json.Unmarshal(cmdOutput, &snapshotChecksum) + if err != nil { + return nil, err + } + + return &snapshotChecksum.Checksum, nil +} + // BdevLvolRename renames a logical volume. // // "oldName": Required. UUID or alias of the existing logical volume. diff --git a/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/types/lvol.go b/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/types/lvol.go index 6f36b4e6..ba1c1cc6 100644 --- a/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/types/lvol.go +++ b/vendor/github.com/longhorn/go-spdk-helper/pkg/spdk/types/lvol.go @@ -150,6 +150,18 @@ type BdevLvolRenameRequest struct { NewName string `json:"new_name"` } +type BdevLvolRegisterSnapshotChecksumRequest struct { + Name string `json:"name"` +} + +type BdevLvolGetSnapshotChecksumRequest struct { + Name string `json:"name"` +} + +type BdevLvolSnapshotChecksum struct { + Checksum uint64 `json:"checksum"` +} + func GetLvolAlias(lvsName, lvolName string) string { return fmt.Sprintf("%s/%s", lvsName, lvolName) } diff --git a/vendor/modules.txt b/vendor/modules.txt index e927e2eb..dd13e1d2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -51,7 +51,7 @@ github.com/longhorn/backupstore github.com/longhorn/backupstore/logging github.com/longhorn/backupstore/types github.com/longhorn/backupstore/util -# github.com/longhorn/go-common-libs v0.0.0-20241217111348-5bad87d5320c +# github.com/longhorn/go-common-libs v0.0.0-20241217170247-b8a12cee7f65 ## explicit; go 1.22.7 github.com/longhorn/go-common-libs/backup github.com/longhorn/go-common-libs/bitmap @@ -64,7 +64,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-spdk-helper v0.0.0-20241216160651-bcce92add55b +# github.com/longhorn/go-spdk-helper v0.0.0-20241217191337-f66a0cd93fc3 ## explicit; go 1.22.7 github.com/longhorn/go-spdk-helper/pkg/jsonrpc github.com/longhorn/go-spdk-helper/pkg/nvme