// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
+#include <fmt/format.h>
+
#include "crimson/common/exception.h"
#include "crimson/osd/recovery_backend.h"
#include "crimson/osd/pg.h"
+#include "messages/MOSDFastDispatchOp.h"
#include "osd/osd_types.h"
namespace {
crimson::common::system_shutdown_exception());
}
}
+
+seastar::future<> RecoveryBackend::handle_recovery_op(
+ Ref<MOSDFastDispatchOp> m)
+{
+ switch (m->get_header().type) {
+ default:
+ return seastar::make_exception_future<>(
+ std::invalid_argument(fmt::format("invalid request type: {}",
+ m->get_header().type)));
+ }
+}
}
virtual seastar::future<> handle_recovery_op(
- Ref<MOSDFastDispatchOp> m) = 0;
+ Ref<MOSDFastDispatchOp> m);
virtual seastar::future<> recover_object(
const hobject_t& soid,
return handle_recovery_delete_reply(
boost::static_pointer_cast<MOSDPGRecoveryDeleteReply>(m));
default:
- return seastar::make_exception_future<>(
- std::invalid_argument(fmt::format("invalid request type: {}",
- m->get_header().type)));
+ // delegate to parent class for handling backend-agnostic recovery ops.
+ return RecoveryBackend::handle_recovery_op(std::move(m));
}
}