}
}
-void pg_log_t::copy_range(const pg_log_t &other, eversion_t from, eversion_t to)
-{
- can_rollback_to = other.can_rollback_to;
- list<pg_log_entry_t>::const_reverse_iterator i = other.log.rbegin();
- ceph_assert(i != other.log.rend());
- while (i->version > to) {
- ++i;
- ceph_assert(i != other.log.rend());
- }
- ceph_assert(i->version == to);
- head = to;
- for ( ; i != other.log.rend(); ++i) {
- if (i->version <= from) {
- tail = i->version;
- break;
- }
- log.push_front(*i);
- }
-}
-
void pg_log_t::copy_up_to(const pg_log_t &other, int max)
{
can_rollback_to = other.can_rollback_to;
*/
void copy_after(const pg_log_t &other, eversion_t from);
- /**
- * copy a range of entries from another pg_log_t
- *
- * @param other pg_log_t to copy from
- * @param from copy entries after this version
- * @param to up to and including this version
- */
- void copy_range(const pg_log_t &other, eversion_t from, eversion_t to);
-
/**
* copy up to N entries
*