osd: Don't mark a copy of a chained read's layer object lost on ENOENT from a racing delete #168

Merged
vitalif merged 1 commits from koolkhel/vitastor:chain-read-enoent-race into master 2026-11-24 03:53:40 +03:00

1 Commits

Author SHA1 Message Date
3dcaa87921 osd: Don't mark a copy of a chained read's layer object lost on ENOENT from a racing delete
Chained reads never set OP_DATA_ENOENT_OK and have no racing-op check,
so a chained read that read a parent layer object's bitmap before a
delete of that object and its data after it marked the copy as missing.
The object became degraded, and the delete, which had seen no object
state when it started, left it degraded after the object was gone.
Recovery then turned it incomplete, and the next chained read of it
hit assert(read_target != 0).

Treat ENOENT as continue_primary_read() does: while a write or delete
runs on the object, or when the object is clean and every part read
answered ENOENT, it was deleted under the read. Don't mark it; the
retry reads the bitmaps again.
2026-11-24 02:53:59 +03:00