* rados_read_op_assert_version()
* - IO on objects: rados_read_op_read(), rados_read_op_checksum(),
* rados_read_op_cmpext()
- * - Custom operations: rados_read_op_exec(), rados_read_op_exec_user_buf()
+ * - Deprecated operations: rados_read_op_exec(), rados_read_op_exec_user_buf()
* - Request properties: rados_read_op_set_flags()
* - Performing the operation: rados_read_op_operate(),
* rados_aio_read_op_operate()
size_t checksum_len, int *prval);
/**
+ * Deprecated because this op does not prevent the client specifying a cls op
+ * that includes a write operation. This could allow the op to be routed to
+ * invalid OSD. Reads are permitted as part of write ops. If performance is a
+ * concern, consider moving to the C++ interface, which provides safety.
+ *
* Execute an OSD class method on an object
* See rados_exec() for general description.
*
size_t in_len,
char **out_buf,
size_t *out_len,
- int *prval);
+ int *prval)
+ __attribute__((deprecated("Use write ops instead")));
/**
+ * * Deprecated because this op does not prevent the client specifying a cls op
+ * that includes a write operation. This could allow the op to be routed to
+ * invalid OSD. Reads are permitted as part of write ops. If performance is a
+ * concern, consider moving to the C++ interface, which provides safety.
+ *
* Execute an OSD class method on an object
* See rados_exec() for general description.
*
char *out_buf,
size_t out_len,
size_t *used_len,
- int *prval);
+ int *prval)
+ __attribute__((deprecated("Use write ops instead")));
/**
* Start iterating over key/value pairs on an object.
#include "test/librados/TestCase.h"
#include "test/librados/test.h"
+// Some tests are performed on deprecated interfaces that have not yet
+// been removed and form part of the ABI/API.
+#define IGNORE_DEPRECATED \
+_Pragma("GCC diagnostic push") \
+_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\" ") \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
+
+#define END_IGNORE_DEPRECATED \
+_Pragma("clang pop") \
+_Pragma("GCC pop")
+
const char *data = "testdata";
const char *obj = "testobj";
const size_t len = strlen(data);
rados_release_read_op(op);
}
+IGNORE_DEPRECATED
TEST_F(CReadOpsTest, SetOpFlags) {
write_object();
remove_object();
}
+END_IGNORE_DEPRECATED
TEST_F(CReadOpsTest, AssertExists) {
rados_read_op_t op = rados_create_read_op();
remove_object();
}
+IGNORE_DEPRECATED
TEST_F(CReadOpsTest, Exec) {
// create object so we don't get -ENOENT
write_object();
remove_object();
}
+END_IGNORE_DEPRECATED
TEST_F(CReadOpsTest, Stat) {
rados_read_op_t op = rados_create_read_op();