diff options
author | Samuel Just <sam.just@inktank.com> | 2013-08-26 23:19:45 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-08-27 18:44:45 -0700 |
commit | fe68b15a3d82349f8941f5b9f70fcbb5d4bc7f97 (patch) | |
tree | 065315fe97e7093a3998afc399f7cde675931432 | |
parent | 7cc2eb246df14925ca27b8dee19b32e0bdb505a8 (diff) | |
download | ceph-fe68b15a3d82349f8941f5b9f70fcbb5d4bc7f97.tar.gz |
PGLog: move the log size check after the early return
There really are stl implementations (like the one on my ubuntu 12.04
machine) which have a list::size() which is linear in the size of the
list. That assert, therefore, is quite expensive!
Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/PGLog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 552f9b0cee9..712c1e1c917 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -205,11 +205,11 @@ protected: log_keys_debug->erase(i++)); } void check() { - assert(log.log.size() == log_keys_debug.size()); if (cct && !(cct->_conf->osd_debug_pg_log_writeout)) { return; } + assert(log.log.size() == log_keys_debug.size()); for (list<pg_log_entry_t>::iterator i = log.log.begin(); i != log.log.end(); ++i) { |