osd: Use role 0 for tombstone copies in replicated pools, revert the stripes guard #161

Merged
vitalif merged 2 commits from koolkhel/vitastor:tomb-replica-role into master 2026-11-24 03:52:22 +03:00

2 Commits

Author SHA1 Message Date
ded4a0b89b Revert "Fix buffer overflow on mark_object_corrupted in a replica pool"
This reverts commit 3e4aa53357.

Copies of a replicated object always have role 0 again, so
stripes[chunk.role] is stripes[0].
2026-11-23 13:15:57 +03:00
eaf6352b8d osd: Use role 0 for tombstone copies in replicated pools
register_tombstone() took the roles of an applied tombstone's copies
from pg.cur_loc_set, which holds the index in the target set even in a
replicated pool. Every other object state of a replicated pool uses
role 0, and code that indexes per-role arrays by chunk.role relies on
it: mark_object_corrupted() over such a tombstone state read past its
one-element stripes array. The roles also broke the (role, osd) dedupe
of outdated copies in register_tombstone().
2026-11-23 13:15:57 +03:00