osd: Finish a read with -EPIPE when its PG stops instead of marking copies corrupted #164

Merged
vitalif merged 4 commits from koolkhel/vitastor:read-epipe-stopped-pg into master 2026-11-24 03:50:47 +03:00

4 Commits

Author SHA1 Message Date
4891aa2564 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-24 00:00:45 +03:00
9a5dd54f99 osd: Finish a chained read with -EPIPE when its PG stops
A read through a snapshot chain still ran check_corrupted_chained() and
retried when a subop failed after its PG stopped. A copy removed by a
repeat delete that the stop cancelled answered -ENOENT, the copy was
marked corrupted with the stale object state, and the retry aborted the
OSD on assert(read_target != 0) in collect_bitmap_requests(), since the
object had no copy left. End such a read with -EPIPE, like a plain read.
2026-11-23 22:25:00 +03:00
4819817d02 osd_test: Drop the PG_HAS_INCOMPLETE assert that peering always clears
Once the read finishes, the PG restarts peering and resets its state, so
the assert held even without the fix. The -EPIPE assert is what catches
a read that judged the copies.
2026-11-23 22:22:28 +03:00
b847e6337b osd: Finish a read with -EPIPE when its PG stops instead of marking copies corrupted
A read whose PG stopped while a subop was in flight still judged the
copies by the object state when a subop failed. A copy that a repeat
delete had just removed answers -ENOENT, the delete itself was cancelled
by the stop before the state was updated, and no operation is queued on
the object any more, so the -ENOENT was taken for corruption: the object
was marked INCOMPLETE and the read failed with -EIO. Peering rebuilds the
object states anyway, so finish such a read with -EPIPE like any other
operation of a stopped PG; the client repeats it after peering.
2026-11-23 13:09:42 +03:00