object_not_found() : error(std::errc::no_such_file_or_directory) {}
};
-struct object_corrupted : public error {
- object_corrupted() : error(std::errc::illegal_byte_sequence) {}
-};
-
struct invalid_argument : public error {
invalid_argument() : error(std::errc::invalid_argument) {}
};
-struct no_message_available : public error {
- no_message_available() : error(std::errc::no_message_available) {}
-};
-
// FIXME: error handling
-struct operation_not_supported : public error {
- operation_not_supported()
- : error(std::errc::operation_not_supported) {
- }
-};
-
struct permission_denied : public error {
permission_denied() : error(std::errc::operation_not_permitted) {}
};
-struct input_output_error : public error {
- input_output_error() : error(std::errc::io_error) {}
-};
-
} // namespace crimson::osd
});
case CEPH_OSD_OP_OMAPSETVALS:
if (!pg.get_pool().info.supports_omap()) {
- throw crimson::osd::operation_not_supported{};
+ return crimson::ct_error::operation_not_supported::make();
}
return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) {
return backend.omap_set_vals(os, osd_op, txn);
std::as_const(msg->get_hobj().nspace));
}
- seastar::future<> dont_do_legacy_op() {
- throw crimson::osd::operation_not_supported();
+ decltype(auto) dont_do_legacy_op() {
+ return crimson::ct_error::operation_not_supported::make();
}
using read_errorator = PGBackend::read_errorator;