]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include, common: make bufferlist's move constructor inlineable. 32937/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 28 Jan 2020 15:39:03 +0000 (16:39 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 14 Feb 2020 13:04:49 +0000 (14:04 +0100)
This is pretty important for crimson as we tend to move future<bl>
in a few places over the hot IO path.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/buffer.cc
src/include/buffer.h

index 35ed182c47f00e6e9a4d86e2b1826ee2878e6dae..3204db6e6362814dd712517f963eddb5ca9556c6 100644 (file)
@@ -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);
index e0b2a4011e1f1d0c56d089b669d46134fe668a08..4a082f971a169a1c5087b0389459d07cc91381c8 100644 (file)
@@ -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();