mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-10-19 13:49:53 +00:00
483181aec2
new version of go ceph is available and this commit make use of the same. Ref # https://github.com/ceph/go-ceph/releases/tag/v0.17.0 Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
29 lines
924 B
Go
29 lines
924 B
Go
//go:build ceph_preview
|
|
// +build ceph_preview
|
|
|
|
package rados
|
|
|
|
// #cgo LDFLAGS: -lrados
|
|
// #include <rados/librados.h>
|
|
// #include <stdlib.h>
|
|
//
|
|
import "C"
|
|
|
|
// SetAllocationHint sets allocation hint for an object. This is an advisory
|
|
// operation, it will always succeed (as if it was submitted with a
|
|
// LIBRADOS_OP_FLAG_FAILOK flag set) and is not guaranteed to do anything on
|
|
// the backend.
|
|
//
|
|
// Implements:
|
|
// void rados_write_op_set_alloc_hint2(rados_write_op_t write_op,
|
|
// uint64_t expected_object_size,
|
|
// uint64_t expected_write_size,
|
|
// uint32_t flags);
|
|
func (w *WriteOp) SetAllocationHint(expectedObjectSize uint64, expectedWriteSize uint64, flags AllocHintFlags) {
|
|
C.rados_write_op_set_alloc_hint2(
|
|
w.op,
|
|
C.uint64_t(expectedObjectSize),
|
|
C.uint64_t(expectedWriteSize),
|
|
C.uint32_t(flags))
|
|
}
|