From: Radoslaw Zarzynski Date: Tue, 11 Sep 2018 11:21:50 +0000 (+0200) Subject: common: drop can_zero_copy() from ceph::buffer interfaces. X-Git-Tag: v14.0.1~273^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2fa78f59ad34e12a495214bfe117cc8b7a7f21f1;p=ceph.git common: drop can_zero_copy() from ceph::buffer interfaces. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 083e9592d1e89..95b97e8414f75 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -822,10 +822,6 @@ using namespace ceph; _raw->invalidate_crc(); memset(c_str()+o, 0, l); } - bool buffer::ptr::can_zero_copy() const - { - return _raw->can_zero_copy(); - } // -- buffer::list::iterator -- /* @@ -1273,16 +1269,6 @@ using namespace ceph; } } - bool buffer::list::can_zero_copy() const - { - for (std::list::const_iterator it = _buffers.begin(); - it != _buffers.end(); - ++it) - if (!it->can_zero_copy()) - return false; - return true; - } - bool buffer::list::is_provided_buffer(const char *dst) const { if (_buffers.empty()) diff --git a/src/include/buffer.h b/src/include/buffer.h index 368dce7e2ee84..992c2b567dbbb 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -335,8 +335,6 @@ namespace buffer CEPH_BUFFER_API { void copy_out(unsigned o, unsigned l, char *dest) const; - bool can_zero_copy() const; - unsigned wasted() const; int cmp(const ptr& o) const; @@ -767,7 +765,6 @@ namespace buffer CEPH_BUFFER_API { bool contents_equal(buffer::list& other); bool contents_equal(const buffer::list& other) const; - bool can_zero_copy() const; bool is_provided_buffer(const char *dst) const; bool is_aligned(unsigned align) const; bool is_page_aligned() const; diff --git a/src/include/buffer_raw.h b/src/include/buffer_raw.h index 549094172e3ee..9193439f4f375 100644 --- a/src/include/buffer_raw.h +++ b/src/include/buffer_raw.h @@ -86,9 +86,6 @@ public: memcpy(c->data, data, len); return c; } - virtual bool can_zero_copy() const { - return false; - } virtual bool is_shareable() { // true if safe to reference/share the existing buffer copy // false if it is not safe to share the buffer, e.g., due to special