We'll want he callers up the chain to take the log
entry as a const ref.
Signed-off-by: Samuel Just <sjust@redhat.com>
if (e.user_version > info.last_user_version)
info.last_user_version = e.user_version;
- /**
- * Make sure we don't keep around more than we need to in the
- * in-memory log
- */
- e.mod_desc.trim_bl();
-
// log mutation
pg_log.add(e);
dout(10) << "add_log_entry " << e << dendl;
// add to log
log.push_back(e);
+ /**
+ * Make sure we don't keep around more than we need to in the
+ * in-memory log
+ */
+ log.back().mod_desc.trim_bl();
+
// riter previously pointed to the previous entry
if (rollback_info_trimmed_to_riter == log.rbegin())
++rollback_info_trimmed_to_riter;