mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-22 14:30:31 +00:00
e10033b34d3f90a14d1a82d7cd2f8d852d27440b
We were seeing ring btree corruption that manifest as the server seeing stale btree blocks as it tried to read all the btrees to migrate blocks during a write. A block it tried to read didn't match its reference. It turned out that block wasn't being migrated. It would get stuck at a position in the ring. Eventually new block writes would overwrite it and then the next read would see corruption. It wasn't being migrated because the block reading function didn't realize that it had to migrate a dirty block. The block was written in a transaction at the end of the ring. The ring wrapped during the transaction and then migration tried to migrate the dirty block. It wouldn't be dirtied, and thus be migrated, because it was already dirty in the transaction. The fix is to add more cases to the dirtying decision which takes migration specifically into account. We'll no longer short circuit dirtying blocks for migration when they're in the old half of the ring even though they're dirty. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
Languages
C
86.4%
Shell
10%
Roff
2.5%
TeX
0.8%
Makefile
0.3%