From e68b7c821c3b3991f01c70272345228a40e52c35 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Tue, 28 Jan 2020 16:39:03 +0100 Subject: [PATCH] include, common: make bufferlist's move constructor inlineable. This is pretty important for crimson as we tend to move future in a few places over the hot IO path. Signed-off-by: Radoslaw Zarzynski --- src/common/buffer.cc | 8 -------- src/include/buffer.h | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 35ed182c47f00..3204db6e63628 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -924,14 +924,6 @@ static ceph::spinlock debug_lock; // -- buffer::list -- - buffer::list::list(list&& other) noexcept - : _buffers(std::move(other._buffers)), - _carriage(other._carriage), - _len(other._len), - _num(other._num) { - other.clear(); - } - void buffer::list::swap(list& other) noexcept { std::swap(_len, other._len); diff --git a/src/include/buffer.h b/src/include/buffer.h index e0b2a4011e1f1..4a082f971a169 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -953,7 +953,14 @@ inline namespace v14_2_0 { _num(other._num) { _buffers.clone_from(other._buffers); } - list(list&& other) noexcept; + + list(list&& other) noexcept + : _buffers(std::move(other._buffers)), + _carriage(other._carriage), + _len(other._len), + _num(other._num) { + other.clear(); + } ~list() { _buffers.clear_and_dispose(); -- 2.39.5