Skip to content

Commit

Permalink
Merge pull request ceph#24040 from rzarzynski/wip-common-bl-drop-raw_…
Browse files Browse the repository at this point in the history
…mmap_pages

common: drop the unused buffer::raw_mmap_pages.

Reviewed-by: Matt Benjamin <[email protected]>
Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored Sep 12, 2018
2 parents cdfcb0f + f654ede commit a2d3049
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
24 changes: 0 additions & 24 deletions src/common/buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,28 +252,6 @@ using namespace ceph;
};

#ifndef __CYGWIN__
class buffer::raw_mmap_pages : public buffer::raw {
public:
MEMPOOL_CLASS_HELPERS();

explicit raw_mmap_pages(unsigned l) : raw(l) {
data = (char*)::mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
if (!data)
throw bad_alloc();
inc_total_alloc(len);
inc_history_alloc(len);
bdout << "raw_mmap " << this << " alloc " << (void *)data << " " << l << " " << buffer::get_total_alloc() << bendl;
}
~raw_mmap_pages() override {
::munmap(data, len);
dec_total_alloc(len);
bdout << "raw_mmap " << this << " free " << (void *)data << " " << buffer::get_total_alloc() << bendl;
}
raw* clone_empty() override {
return new raw_mmap_pages(len);
}
};

class buffer::raw_posix_aligned : public buffer::raw {
unsigned align;
public:
Expand Down Expand Up @@ -2635,8 +2613,6 @@ std::ostream& buffer::operator<<(std::ostream& out, const buffer::error& e)

MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_malloc, buffer_raw_malloc,
buffer_meta);
MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_mmap_pages, buffer_raw_mmap_pagse,
buffer_meta);
MEMPOOL_DEFINE_OBJECT_FACTORY(buffer::raw_posix_aligned,
buffer_raw_posix_aligned, buffer_meta);
#ifdef CEPH_HAVE_SPLICE
Expand Down
1 change: 0 additions & 1 deletion src/include/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ namespace buffer CEPH_BUFFER_API {
class raw;
class raw_malloc;
class raw_static;
class raw_mmap_pages;
class raw_posix_aligned;
class raw_hack_aligned;
class raw_char;
Expand Down

0 comments on commit a2d3049

Please sign in to comment.