Store v2: Wait for fsyncs submitted by other operations before completing a sync #107

Open
koolkhel wants to merge 1 commits from koolkhel/vitastor:v2-chaos-105267292 into master

1 Commits

Author SHA1 Message Date
933f2302df Store v2: Wait for fsyncs submitted by other operations before completing a sync
do_sync() returned at once when nothing was left unsynced, but these
counters are reset when an fsync is submitted, not when it completes. So
a stabilize or rollback whose metadata block was written before another
operation submitted its fsync completed before that fsync did, and a
power outage could undo it: test_blockstore_chaos --seed 105267292 sees
a rolled back version come back.

Wait until everything completed is fsynced instead. A waiting sync still
counts as unfinished, so that the next one doesn't overtake it and have
its pending fsyncs reset.
2026-10-26 20:59:35 +03:00