Lock PGs on secondary OSDs to allow local reads and guarantee splitbrain prevention

This commit is contained in:
Vitaliy Filippov
2025-05-10 15:18:00 +03:00
parent 66dc116f60
commit b2416afb28
21 changed files with 676 additions and 175 deletions
+10
View File
@@ -489,3 +489,13 @@ void pg_t::print_state()
total_count
);
}
bool pg_t::can_stop()
{
return inflight == 0 && inflight_locks == 0 && !lock_peers.size() && !flush_batch;
}
bool pg_t::can_repeer()
{
return inflight == 0 && !flush_batch;
}