mirror of
https://github.com/ceph/ceph
synced 2025-01-31 07:22:56 +00:00
osd: always write backlog after creation
dirty_log is never set to true, so we would set the log.backlog flag but not write it to disk. If we restarted the OSD, we would think we had the backlog in the log but in reality we would not. clean_up_local() could then erase almost every object in the PG. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
parent
19afe11cc5
commit
3055d09441
@ -4593,10 +4593,8 @@ void OSD::generate_backlog(PG *pg)
|
||||
C_Contexts *fin = new C_Contexts;
|
||||
pg->do_peer(*t, fin->contexts, query_map, NULL);
|
||||
do_queries(query_map);
|
||||
if (pg->dirty_info)
|
||||
pg->write_info(*t);
|
||||
if (pg->dirty_log)
|
||||
pg->write_log(*t);
|
||||
pg->write_info(*t);
|
||||
pg->write_log(*t);
|
||||
int tr = store->queue_transaction(&pg->osr, t, new ObjectStore::C_DeleteTransaction(t), fin);
|
||||
assert(tr == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user