mirror of
https://github.com/ceph/ceph
synced 2025-01-11 13:41:02 +00:00
ReplicatedPG::snap_trimmer: requeue if scrub_block_writes
Otherwise, we do not continue snap_trimming once scrub is complete. Noticed while revewing another patch. This would result in snaps not being trimmed again until the next map update. Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
480380025b
commit
1041b92ca5
@ -1439,16 +1439,15 @@ void ReplicatedPG::snap_trimmer()
|
||||
dout(10) << "snap_trimmer entry" << dendl;
|
||||
if (is_primary()) {
|
||||
entity_inst_t nobody;
|
||||
if (!mode.try_write(nobody)) {
|
||||
if (!mode.try_write(nobody) || scrub_block_writes) {
|
||||
dout(10) << " can't write, requeueing" << dendl;
|
||||
queue_snap_trim();
|
||||
unlock();
|
||||
return;
|
||||
}
|
||||
if (!scrub_block_writes) {
|
||||
dout(10) << "snap_trimmer posting" << dendl;
|
||||
snap_trimmer_machine.process_event(SnapTrim());
|
||||
}
|
||||
|
||||
dout(10) << "snap_trimmer posting" << dendl;
|
||||
snap_trimmer_machine.process_event(SnapTrim());
|
||||
|
||||
if (snap_trimmer_machine.need_share_pg_info) {
|
||||
dout(10) << "snap_trimmer share_pg_info" << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user