]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: kill remainings of bufferlist's append_buffer.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 20 Sep 2018 12:12:07 +0000 (08:12 -0400)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 1 Feb 2019 21:54:50 +0000 (22:54 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/buffer.cc
src/include/buffer.h

index de12bec1dd1c52775e438b25d4f3d95c48dbeefa..4e309ac5eb7a649d468c66f1c8cfeb4c73790425 100644 (file)
@@ -999,7 +999,6 @@ static ceph::spinlock debug_lock;
       _len(other._len),
       _memcopy_count(other._memcopy_count),
       last_p(this) {
-    append_buffer.swap(other.append_buffer);
     other.clear();
   }
 
@@ -1008,7 +1007,6 @@ static ceph::spinlock debug_lock;
     std::swap(_len, other._len);
     std::swap(_memcopy_count, other._memcopy_count);
     _buffers.swap(other._buffers);
-    append_buffer.swap(other.append_buffer);
     //last_p.swap(other.last_p);
     last_p = begin();
     other.last_p = other.begin();
@@ -1170,9 +1168,6 @@ static ceph::spinlock debug_lock;
 
   void buffer::list::reassign_to_mempool(int pool)
   {
-    if (append_buffer.get_raw()) {
-      append_buffer.get_raw()->reassign_to_mempool(pool);
-    }
     for (auto& p : _buffers) {
       p.get_raw()->reassign_to_mempool(pool);
     }
@@ -1180,9 +1175,6 @@ static ceph::spinlock debug_lock;
 
   void buffer::list::try_assign_to_mempool(int pool)
   {
-    if (append_buffer.get_raw()) {
-      append_buffer.get_raw()->try_assign_to_mempool(pool);
-    }
     for (auto& p : _buffers) {
       p.get_raw()->try_assign_to_mempool(pool);
     }
index ec2babd281eb26f096244d8063c538f61f34f5df..6b2dc275744b149cb9d178122343bc32d4b35d34 100644 (file)
@@ -655,7 +655,6 @@ namespace buffer CEPH_BUFFER_API {
     buffers_t _buffers;
     unsigned _len;
     unsigned _memcopy_count; //the total of memcopy using rebuild().
-    ptr append_buffer;  // where i put small appends.
 
     template <bool is_const>
     class CEPH_BUFFER_API iterator_impl {
@@ -994,7 +993,6 @@ namespace buffer CEPH_BUFFER_API {
       _len = other._len;
       _memcopy_count = other._memcopy_count;
       last_p = begin();
-      append_buffer.swap(other.append_buffer);
       other.clear();
       return *this;
     }
@@ -1060,7 +1058,6 @@ namespace buffer CEPH_BUFFER_API {
       _len = 0;
       _memcopy_count = 0;
       last_p = begin();
-      append_buffer = ptr();
     }
     void push_back(const ptr& bp) {
       if (bp.length() == 0)