mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
osd/PGLog: avoid return by value on ginormous log
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
643ae42cf2
commit
a6ead99877
@ -31,16 +31,16 @@ static ostream& _prefix(std::ostream *_dout, const PGLog *pglog)
|
||||
|
||||
//////////////////// PGLog::IndexedLog ////////////////////
|
||||
|
||||
PGLog::IndexedLog PGLog::IndexedLog::split_out_child(
|
||||
void PGLog::IndexedLog::split_out_child(
|
||||
pg_t child_pgid,
|
||||
unsigned split_bits)
|
||||
unsigned split_bits,
|
||||
PGLog::IndexedLog *target)
|
||||
{
|
||||
unindex();
|
||||
IndexedLog ret(pg_log_t::split_out_child(child_pgid, split_bits));
|
||||
*target = pg_log_t::split_out_child(child_pgid, split_bits);
|
||||
index();
|
||||
ret.index();
|
||||
target->index();
|
||||
reset_rollback_info_trimmed_to_riter();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void PGLog::IndexedLog::trim(
|
||||
|
@ -213,9 +213,10 @@ public:
|
||||
index();
|
||||
}
|
||||
|
||||
IndexedLog split_out_child(
|
||||
void split_out_child(
|
||||
pg_t child_pgid,
|
||||
unsigned split_bits);
|
||||
unsigned split_bits,
|
||||
IndexedLog *target);
|
||||
|
||||
void zero() {
|
||||
// we must have already trimmed the old entries
|
||||
@ -655,7 +656,7 @@ public:
|
||||
pg_t child_pgid,
|
||||
unsigned split_bits,
|
||||
PGLog *opg_log) {
|
||||
opg_log->log = log.split_out_child(child_pgid, split_bits);
|
||||
log.split_out_child(child_pgid, split_bits, &opg_log->log);
|
||||
missing.split_into(child_pgid, split_bits, &(opg_log->missing));
|
||||
opg_log->mark_dirty_to(eversion_t::max());
|
||||
mark_dirty_to(eversion_t::max());
|
||||
|
Loading…
Reference in New Issue
Block a user