This is a left over from v0.19.0 release where we missed to remove
preview tag when corresponding API was promoted to stable.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Add support for getting the alignment (stripe size) in bytes for pools that require/support it.
Fixes#739
This commit adds two new API calls to IOContext, one to know if the pool requires alignment and
the second one to get the stripe size in bytes:
RequiresAlignment() (bool, error)
Alignment() (uint64, error)
Signed-off-by: Daniel M. Lambea <dmlambea@tenerife.es>
Because we have a finalizer configured for Conn that cleans up Ceph
resources, it's important that we don't let it get GC'd before anything
that depends on it has been cleaned up. Since clients are free to hold a
reference to an IOContext without maintaining a reference to the
underlying Conn, we hold such a Conn reference within the IOContext to
signal this dependency to the Go GC.
Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
Previous changes added support for operating on omap keys that include
null characters (e.g. rados_omap_get_next2,
rados_write_op_omap_rm_keys2). This change adds some basic test
coverage those operations' null character support.
Signed-off-by: Nick Janus <github@nondesignated.com>
The previous `rados_nobjects_list_open` used for listing could not
return oids that included null characters. Although this isn't a common
case, having go-ceph able to list such objects is useful for bugs such
as https://tracker.ceph.com/issues/48874.
Signed-off-by: Nick Janus <github@nondesignated.com>
WriteOp.RmOmapKeys now uses rados_write_op_omap_rm_keys2().
The entirety of removeOmapKeysStep struct was removed as it's not necessary for
it to own the various C-allocated values passed to
rados_write_op_omap_rm_keys2() as arguments. rados_write_op_omap_rm_keys2()
makes copies of all the string-based args [1], so it's sufficient for them to
be short lived.
[1] 2bd3dd512a/src/librados/librados_c.cc (L3888-L3902)
WriteOp.SetOmap now uses rados_write_op_omap_set2().
The entirety of setOmapStep struct was removed as it's not necessary for it to
own the various C-allocated values passed to rados_write_op_omap_set2()
as arguments. rados_write_op_omap_set2() makes copies of all the string-based
args [1], so it's sufficient for them to be short lived.
[1] 2bd3dd512a/src/librados/librados_c.cc (L3852-L3871)
add wrapper to set locator key on IOContext
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* mark API as PREVIEW and update docs
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* move new API call into own file to add preview build tag
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* reset locater with nil instead of a empty string
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* rename variables for naming consistency
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
* update release versions for new API call
Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
This change implements the bindings for the watch/notify APIs of
librados. Instead of callbacks, the watcher is implemented with more
Go-idiomatic channels. A watcher object exposes two read-only
channels, one to receive the notify events and one to receive
occuring errors.
Signed-off-by: Sven Anderson <sven@redhat.com>
This commit implements binding for read_op_omap_get_vals_by_keys
RADOS Read operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_write_op_setxattr
RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_read_op_assert_version
RADOS Read operation as well as rados_write_op_assert_version
RADOS Write operation.
Includes unit tests for both.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_write_op_remove RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
This commit implements binding for rados_write_op_cmpext RADOS Write operation.
Includes a unit test.
Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
We no longer support ceph luminous, and have not for a while. This
test case was kept separately from the others because it didn't function
correctly when tested against luminous clusters. As part of the effort
to remove the unsupported build tags, there's no longer even a reason
to keep this as it's own file with the tags removed, so merge it
together.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This struct has public fields that violate standard naming
conventions.
Disable the check on this struct only.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This struct has public fields that violate standard naming conventions.
Disable the check on this struct only.
Signed-off-by: John Mulligan <jmulligan@redhat.com>