ceph/0005-src-librbd-migration.patch

79 lines
3.3 KiB
Diff
Raw Normal View History

--- ceph-16.1.0/src/librbd/AsioEngine.h.orig 2021-01-27 09:52:12.314415539 -0500
+++ ceph-16.1.0/src/librbd/AsioEngine.h 2021-01-27 09:55:35.289955105 -0500
@@ -39,7 +39,8 @@
inline operator boost::asio::io_context&() {
return m_io_context;
}
- inline boost::asio::io_context::executor_type get_executor() {
+ using executor_type = boost::asio::io_context::executor_type;
+ inline executor_type get_executor() {
return m_io_context.get_executor();
}
--- ceph-16.1.0/src/librbd/migration/FileStream.cc.orig 2021-01-27 09:58:21.984505879 -0500
+++ ceph-16.1.0/src/librbd/migration/FileStream.cc 2021-01-27 09:58:48.945241982 -0500
@@ -121,7 +121,8 @@
template <typename I>
FileStream<I>::FileStream(I* image_ctx, const json_spirit::mObject& json_object)
: m_cct(image_ctx->cct), m_asio_engine(image_ctx->asio_engine),
- m_json_object(json_object), m_strand(*m_asio_engine) {
+ m_json_object(json_object),
+ m_strand(boost::asio::make_strand(*m_asio_engine)) {
}
template <typename I>
--- ceph-16.1.0/src/librbd/migration/FileStream.h.orig 2021-01-27 09:59:03.542640537 -0500
+++ ceph-16.1.0/src/librbd/migration/FileStream.h 2021-01-27 09:59:42.054692043 -0500
@@ -6,7 +6,8 @@
#include "include/int_types.h"
#include "librbd/migration/StreamInterface.h"
-#include <boost/asio/io_context_strand.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/strand.hpp>
#include <boost/asio/posix/basic_stream_descriptor.hpp>
#include <json_spirit/json_spirit.h>
#include <memory>
@@ -48,7 +49,7 @@
std::shared_ptr<AsioEngine> m_asio_engine;
json_spirit::mObject m_json_object;
- boost::asio::io_context::strand m_strand;
+ boost::asio::strand<boost::asio::io_context::executor_type> m_strand;
#ifdef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
std::optional<boost::asio::posix::stream_descriptor> m_stream_descriptor;
--- ceph-16.1.0/src/librbd/migration/HttpClient.cc.orig 2021-01-27 10:00:04.167295789 -0500
+++ ceph-16.1.0/src/librbd/migration/HttpClient.cc 2021-01-27 10:00:34.303118596 -0500
@@ -764,7 +764,8 @@
template <typename I>
HttpClient<I>::HttpClient(I* image_ctx, const std::string& url)
: m_cct(image_ctx->cct), m_image_ctx(image_ctx),
- m_asio_engine(image_ctx->asio_engine), m_url(url), m_strand(*m_asio_engine),
+ m_asio_engine(image_ctx->asio_engine), m_url(url),
+ m_strand(boost::asio::make_strand(*m_asio_engine)),
m_ssl_context(boost::asio::ssl::context::sslv23_client) {
m_ssl_context.set_default_verify_paths();
}
--- ceph-16.1.0/src/librbd/migration/HttpClient.h.orig 2021-01-27 10:00:49.626536973 -0500
+++ ceph-16.1.0/src/librbd/migration/HttpClient.h 2021-01-27 10:01:38.728877629 -0500
@@ -9,7 +9,8 @@
#include "librbd/io/Types.h"
#include "librbd/migration/HttpProcessorInterface.h"
#include "librbd/migration/Types.h"
-#include <boost/asio/io_context_strand.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/strand.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/context.hpp>
#include <boost/beast/version.hpp>
@@ -171,7 +172,7 @@
HttpProcessorInterface* m_http_processor = nullptr;
- boost::asio::io_context::strand m_strand;
+ boost::asio::strand<boost::asio::io_context::executor_type> m_strand;
boost::asio::ssl::context m_ssl_context;
std::unique_ptr<HttpSessionInterface> m_http_session;