]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async, v2: drop alloc_aligned_buffer().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 4 Mar 2019 00:51:57 +0000 (01:51 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 4 Mar 2019 00:51:57 +0000 (01:51 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/msg/async/ProtocolV2.cc

index ff5cff1686f5eece123fe800b3d203cd10a3e4ee..6235dbe8e4a093707cbbdc90c8c04b43703a225f 100644 (file)
@@ -72,24 +72,6 @@ if(connection->interceptor) { \
 #define INTERCEPT(S)
 #endif
 
-static void alloc_aligned_buffer(bufferlist &data, unsigned len, unsigned off)
-{
-  // create a buffer to read into that matches the data alignment
-  unsigned alloc_len = 0;
-  unsigned left = len;
-  unsigned head = 0;
-  if (off & ~CEPH_PAGE_MASK) {
-    // head
-    alloc_len += CEPH_PAGE_SIZE;
-    head = std::min<uint64_t>(CEPH_PAGE_SIZE - (off & ~CEPH_PAGE_MASK), left);
-    left -= head;
-  }
-  alloc_len += left;
-  bufferptr ptr(buffer::create_small_page_aligned(alloc_len));
-  if (head) ptr.set_offset(CEPH_PAGE_SIZE - head);
-  data.push_back(std::move(ptr));
-}
-
 ProtocolV2::ProtocolV2(AsyncConnection *connection)
     : Protocol(2, connection),
       temp_buffer(nullptr),