osd: Fix an endless retry of a chained read when the object state goes away #167

Open
koolkhel wants to merge 2 commits from koolkhel/vitastor:chain-read-eio-loop into master

2 Commits

Author SHA1 Message Date
4f5016c6d8 osd: Don't copy into a NULL bitmap in the test fixture's read_bitmap()
Scrub asks read_bitmap() only for the version and passes no bitmap.
2026-11-23 23:58:58 +03:00
f6f78ae474 osd: Fix an endless retry of a chained read when the object state goes away
A chained read keeps the object state of each layer in chain_states[]
and refreshed it only while the PG was not exactly PG_ACTIVE. When the
last unclean object's recovery finished during the read, the kept
pointer was stale, so a read error never marked the failing copy
(mark_object() saw a changed state and skipped the mark), and the
unconditional retry read the same copy again, forever.

Take the state of every read layer on each attempt. In a clean PG it is
NULL and the read target is cur_set, as before.
2026-11-23 22:13:46 +03:00