mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 08:40:23 +00:00
cd83c7be48
Bumps [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) from 0.13.0 to 0.14.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/compare/v0.13.0...v0.14.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>
32 lines
519 B
Go
32 lines
519 B
Go
package rados
|
|
|
|
// #include <stdint.h>
|
|
import "C"
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
type readStep struct {
|
|
withoutUpdate
|
|
withoutFree
|
|
// the c pointer utilizes the Go byteslice data and no free is needed
|
|
|
|
// inputs:
|
|
b []byte
|
|
|
|
// arguments:
|
|
cBuffer *C.char
|
|
cReadLen C.size_t
|
|
cOffset C.uint64_t
|
|
}
|
|
|
|
func newReadStep(b []byte, offset uint64) *readStep {
|
|
return &readStep{
|
|
b: b,
|
|
cBuffer: (*C.char)(unsafe.Pointer(&b[0])), // TODO: must be pinned
|
|
cReadLen: C.size_t(len(b)),
|
|
cOffset: C.uint64_t(offset),
|
|
}
|
|
}
|