Bump reva
This commit is contained in:
+10
-2
@@ -81,10 +81,18 @@ type CloneSource struct {
|
||||
Snapshot string `json:"snapshot"`
|
||||
}
|
||||
|
||||
// CloneProgressReport contains the progress report of a subvolume clone.
|
||||
type CloneProgressReport struct {
|
||||
PercentageCloned string `json:"percentage cloned"`
|
||||
AmountCloned string `json:"amount cloned"`
|
||||
FilesCloned string `json:"files cloned"`
|
||||
}
|
||||
|
||||
// CloneStatus reports on the status of a subvolume clone.
|
||||
type CloneStatus struct {
|
||||
State CloneState `json:"state"`
|
||||
Source CloneSource `json:"source"`
|
||||
State CloneState `json:"state"`
|
||||
Source CloneSource `json:"source"`
|
||||
ProgressReport CloneProgressReport `json:"progress_report"`
|
||||
|
||||
// failure can be obtained through .GetFailure()
|
||||
failure *CloneFailure
|
||||
|
||||
+3
@@ -37,6 +37,9 @@ var (
|
||||
ErrNotConnected = getError(-C.ENOTCONN)
|
||||
// ErrNotExist indicates a non-specific missing resource.
|
||||
ErrNotExist = getError(-C.ENOENT)
|
||||
// ErrOpNotSupported is returned in general for operations that are not
|
||||
// supported.
|
||||
ErrOpNotSupported = getError(-C.EOPNOTSUPP)
|
||||
|
||||
// Private errors:
|
||||
|
||||
|
||||
+5
-5
@@ -43,13 +43,13 @@ type SizeFunc func(size int) (hint Hint)
|
||||
// DoubleSize or indicating a size not greater than the current size, the size
|
||||
// is doubled. If the hint or next size is greater than the max size, the max
|
||||
// size is used for a last retry.
|
||||
func WithSizes(size int, max int, f SizeFunc) {
|
||||
if size > max {
|
||||
func WithSizes(size int, maxSize int, f SizeFunc) {
|
||||
if size > maxSize {
|
||||
return
|
||||
}
|
||||
for {
|
||||
hint := f(size)
|
||||
if hint == nil || size == max {
|
||||
if hint == nil || size == maxSize {
|
||||
break
|
||||
}
|
||||
if hint.size() > size {
|
||||
@@ -57,8 +57,8 @@ func WithSizes(size int, max int, f SizeFunc) {
|
||||
} else {
|
||||
size *= 2
|
||||
}
|
||||
if size > max {
|
||||
size = max
|
||||
if size > maxSize {
|
||||
size = maxSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
//go:build ceph_preview
|
||||
|
||||
package rados
|
||||
|
||||
// #cgo LDFLAGS: -lrados
|
||||
// #include <stdlib.h>
|
||||
// #include <rados/librados.h>
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// GetAddrs returns the addresses of the RADOS session,
|
||||
// suitable for blocklisting.
|
||||
//
|
||||
// Implements:
|
||||
//
|
||||
// int rados_getaddrs(rados_t cluster, char **addrs)
|
||||
func (c *Conn) GetAddrs() (string, error) {
|
||||
var cAddrs *C.char
|
||||
defer C.free(unsafe.Pointer(cAddrs))
|
||||
|
||||
ret := C.rados_getaddrs(c.cluster, &cAddrs)
|
||||
if ret < 0 {
|
||||
return "", getError(ret)
|
||||
}
|
||||
|
||||
return C.GoString(cAddrs), nil
|
||||
}
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
//go:build ceph_preview
|
||||
// +build ceph_preview
|
||||
|
||||
package rados
|
||||
|
||||
// #cgo LDFLAGS: -lrados
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
//go:build ceph_preview
|
||||
// +build ceph_preview
|
||||
|
||||
package rados
|
||||
|
||||
// #cgo LDFLAGS: -lrados
|
||||
|
||||
Reference in New Issue
Block a user