mirror of
https://github.com/ceph/go-ceph
synced 2025-01-24 07:02:48 +00:00
rados: add LIBRADOS_OP_FLAG_* constants
The LIBRADOS_OP_FLAG_* constants can be passed to rbd_writesame() and other operations that will be added in the future. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
c8f26a841b
commit
460837e900
@ -25,6 +25,33 @@ const (
|
|||||||
RadosAllNamespaces = AllNamespaces
|
RadosAllNamespaces = AllNamespaces
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// OpFlags are flags that can be set on a per-op basis.
|
||||||
|
type OpFlags uint
|
||||||
|
|
||||||
|
const (
|
||||||
|
// OpFlagNone can be use to not set any flags.
|
||||||
|
OpFlagNone = OpFlags(0)
|
||||||
|
// OpFlagExcl marks an op to fail a create operation if the object
|
||||||
|
// already exists.
|
||||||
|
OpFlagExcl = OpFlags(C.LIBRADOS_OP_FLAG_EXCL)
|
||||||
|
// OpFlagFailOk allows the transaction to succeed even if the flagged
|
||||||
|
// op fails.
|
||||||
|
OpFlagFailOk = OpFlags(C.LIBRADOS_OP_FLAG_FAILOK)
|
||||||
|
// OpFlagFAdviseRandom indicates read/write op random.
|
||||||
|
OpFlagFAdviseRandom = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_RANDOM)
|
||||||
|
// OpFlagFAdviseSequential indicates read/write op sequential.
|
||||||
|
OpFlagFAdviseSequential = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL)
|
||||||
|
// OpFlagFAdviseWillNeed indicates read/write data will be accessed in
|
||||||
|
// the near future (by someone).
|
||||||
|
OpFlagFAdviseWillNeed = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_WILLNEED)
|
||||||
|
// OpFlagFAdviseDontNeed indicates read/write data will not accessed in
|
||||||
|
// the near future (by anyone).
|
||||||
|
OpFlagFAdviseDontNeed = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_DONTNEED)
|
||||||
|
// OpFlagFAdviseNoCache indicates read/write data will not accessed
|
||||||
|
// again (by *this* client).
|
||||||
|
OpFlagFAdviseNoCache = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_NOCACHE)
|
||||||
|
)
|
||||||
|
|
||||||
// Version returns the major, minor, and patch components of the version of
|
// Version returns the major, minor, and patch components of the version of
|
||||||
// the RADOS library linked against.
|
// the RADOS library linked against.
|
||||||
func Version() (int, int, int) {
|
func Version() (int, int, int) {
|
||||||
|
12
rados/rados_nautilus.go
Normal file
12
rados/rados_nautilus.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// +build !mimic
|
||||||
|
|
||||||
|
package rados
|
||||||
|
|
||||||
|
// #include <rados/librados.h>
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
const (
|
||||||
|
// OpFlagFAdviseFUA optionally support FUA (force unit access) on write
|
||||||
|
// requests.
|
||||||
|
OpFlagFAdviseFUA = OpFlags(C.LIBRADOS_OP_FLAG_FADVISE_FUA)
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user