mirror of https://github.com/ceph/go-ceph
rbd: RbdFeature* constants should be uint64
rbd_get_features() returns a uint64_t with the features that are set in the image. That means combining (with logical OR) features should result in a uint64 too. Marking all features explicitly uint64 makes it easier and cleaner to set/test features. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
0b8f4eb7e5
commit
dbfc54d61e
26
rbd/rbd.go
26
rbd/rbd.go
|
@ -24,29 +24,29 @@ import (
|
|||
|
||||
const (
|
||||
// RBD features.
|
||||
RbdFeatureLayering = C.RBD_FEATURE_LAYERING
|
||||
RbdFeatureStripingV2 = C.RBD_FEATURE_STRIPINGV2
|
||||
RbdFeatureExclusiveLock = C.RBD_FEATURE_EXCLUSIVE_LOCK
|
||||
RbdFeatureObjectMap = C.RBD_FEATURE_OBJECT_MAP
|
||||
RbdFeatureFastDiff = C.RBD_FEATURE_FAST_DIFF
|
||||
RbdFeatureDeepFlatten = C.RBD_FEATURE_DEEP_FLATTEN
|
||||
RbdFeatureJournaling = C.RBD_FEATURE_JOURNALING
|
||||
RbdFeatureDataPool = C.RBD_FEATURE_DATA_POOL
|
||||
RbdFeatureLayering = uint64(C.RBD_FEATURE_LAYERING)
|
||||
RbdFeatureStripingV2 = uint64(C.RBD_FEATURE_STRIPINGV2)
|
||||
RbdFeatureExclusiveLock = uint64(C.RBD_FEATURE_EXCLUSIVE_LOCK)
|
||||
RbdFeatureObjectMap = uint64(C.RBD_FEATURE_OBJECT_MAP)
|
||||
RbdFeatureFastDiff = uint64(C.RBD_FEATURE_FAST_DIFF)
|
||||
RbdFeatureDeepFlatten = uint64(C.RBD_FEATURE_DEEP_FLATTEN)
|
||||
RbdFeatureJournaling = uint64(C.RBD_FEATURE_JOURNALING)
|
||||
RbdFeatureDataPool = uint64(C.RBD_FEATURE_DATA_POOL)
|
||||
|
||||
RbdFeaturesDefault = C.RBD_FEATURES_DEFAULT
|
||||
RbdFeaturesDefault = uint64(C.RBD_FEATURES_DEFAULT)
|
||||
|
||||
// Features that make an image inaccessible for read or write by clients that don't understand
|
||||
// them.
|
||||
RbdFeaturesIncompatible = C.RBD_FEATURES_INCOMPATIBLE
|
||||
RbdFeaturesIncompatible = uint64(C.RBD_FEATURES_INCOMPATIBLE)
|
||||
|
||||
// Features that make an image unwritable by clients that don't understand them.
|
||||
RbdFeaturesRwIncompatible = C.RBD_FEATURES_RW_INCOMPATIBLE
|
||||
RbdFeaturesRwIncompatible = uint64(C.RBD_FEATURES_RW_INCOMPATIBLE)
|
||||
|
||||
// Features that may be dynamically enabled or disabled.
|
||||
RbdFeaturesMutable = C.RBD_FEATURES_MUTABLE
|
||||
RbdFeaturesMutable = uint64(C.RBD_FEATURES_MUTABLE)
|
||||
|
||||
// Features that only work when used with a single client using the image for writes.
|
||||
RbdFeaturesSingleClient = C.RBD_FEATURES_SINGLE_CLIENT
|
||||
RbdFeaturesSingleClient = uint64(C.RBD_FEATURES_SINGLE_CLIENT)
|
||||
)
|
||||
|
||||
// bits for Image.validate() and Snapshot.validate()
|
||||
|
|
Loading…
Reference in New Issue