From: Radoslaw Zarzynski Date: Thu, 20 Sep 2018 12:12:07 +0000 (-0400) Subject: common: kill remainings of bufferlist's append_buffer. X-Git-Tag: v14.1.0~222^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7362e5b585b8e8caa8c4e18a206f1791df4a5e50;p=ceph.git common: kill remainings of bufferlist's append_buffer. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index de12bec1dd1..4e309ac5eb7 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -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); } diff --git a/src/include/buffer.h b/src/include/buffer.h index ec2babd281e..6b2dc275744 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -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 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)