rebase: bump github.com/ceph/go-ceph

Bumps [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) from 0.26.1-0.20240319113421-755481f8c243 to 0.27.0.
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](https://github.com/ceph/go-ceph/commits/v0.27.0)

---
updated-dependencies:
- dependency-name: github.com/ceph/go-ceph
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2024-04-15 20:53:27 +00:00
committed by mergify[bot]
parent 29f1fbeb84
commit 51d1d46dd2
10 changed files with 300 additions and 59 deletions

View File

@ -43,6 +43,10 @@ const (
// from librbd
FeatureOperations = uint64(C.RBD_FEATURE_OPERATIONS)
// FeatureMigrating is the representation of RBD_FEATURE_MIGRATING from
// librbd
FeatureMigrating = uint64(C.RBD_FEATURE_MIGRATING)
// RBD features, strings
// FeatureNameLayering is the representation of
@ -81,6 +85,10 @@ const (
// RBD_FEATURE_NAME_OPERATIONS from librbd
FeatureNameOperations = C.RBD_FEATURE_NAME_OPERATIONS
// FeatureNameMigrating is the representation of
// RBD_FEATURE_NAME_MIGRATING from librbd
FeatureNameMigrating = C.RBD_FEATURE_NAME_MIGRATING
// old names for backwards compatibility (unused?)
// RbdFeatureLayering deprecated alias for FeatureLayering
@ -124,6 +132,7 @@ var (
FeatureNameJournaling: FeatureJournaling,
FeatureNameDataPool: FeatureDataPool,
FeatureNameOperations: FeatureOperations,
FeatureNameMigrating: FeatureMigrating,
}
)

View File

@ -1,18 +0,0 @@
package rbd
// #include <rbd/librbd.h>
import "C"
const (
// FeatureMigrating is the representation of RBD_FEATURE_MIGRATING from
// librbd
FeatureMigrating = uint64(C.RBD_FEATURE_MIGRATING)
// FeatureNameMigrating is the representation of
// RBD_FEATURE_NAME_MIGRATING from librbd
FeatureNameMigrating = C.RBD_FEATURE_NAME_MIGRATING
)
func init() {
featureNameToBit[FeatureNameMigrating] = FeatureMigrating
}

View File

@ -936,7 +936,10 @@ func (image *Image) GetSnapshotNames() (snaps []SnapInfo, err error) {
var cMaxSnaps C.int
ret := C.rbd_snap_list(image.image, nil, &cMaxSnaps)
// bugfix index out of range(&cSnaps[0])
if cMaxSnaps < 1 {
return nil, rbdError(ret)
}
cSnaps := make([]C.rbd_snap_info_t, cMaxSnaps)
snaps = make([]SnapInfo, cMaxSnaps)

View File

@ -1,10 +1,11 @@
//go:build ceph_preview
package rbd
/*
#cgo LDFLAGS: -lrbd
#ifndef _POSIX_C_SOURCE
// possibly defined in /usr/include/features.h already
#define _POSIX_C_SOURCE 200112L
#endif
#undef _GNU_SOURCE
#include <errno.h>
#include <stdlib.h>