]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: drop can_zero_copy() from ceph::buffer interfaces.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 11 Sep 2018 11:21:50 +0000 (13:21 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 17 Sep 2018 13:34:33 +0000 (15:34 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/buffer.cc
src/include/buffer.h
src/include/buffer_raw.h

index 083e9592d1e89f60bb5f75962a78034266b3c194..95b97e8414f757ec56287e6cb5fa965e1ec74ea1 100644 (file)
@@ -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<ptr>::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())
index 368dce7e2ee8400ac18c82f4a4430a5c77278faf..992c2b567dbbb23d26e101aa993b7b90fc1b5669 100644 (file)
@@ -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;
index 549094172e3ee0b6571a303b5478bcde3fa1f243..9193439f4f3757b195de0a96d96ab7b087adb3ca 100644 (file)
@@ -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