]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/osd_type: kill log.approx_size() 18481/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 21 Oct 2017 02:21:56 +0000 (10:21 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 24 Oct 2017 00:37:17 +0000 (08:37 +0800)
commit46bfe362ed3fff41cee878e685e0d95cd1e41fcf
treeb7a5fc9216b92f077b53eca5fb9c92475a7f0999
parent94c7e97c6d0de75d7fbf4366228902ae9436621d
osd/osd_type: kill log.approx_size()

We used approx_size() because std::list::size() used to be O(n) instead of O(1),
but it is constant now in C++11.

Also counting the precise number of current log entries here is much more
meaningful.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PrimaryLogPG.cc
src/osd/osd_types.h