Return the read error instead of EDOM when a disk read fails #166

Merged
vitalif merged 1 commits from koolkhel/vitastor:read-error-skip-csum into master 2026-11-24 03:46:48 +03:00
Contributor

Description

Both stores verified the checksums of a read even when its I/O failed, over a buffer the read never filled. The check then failed, EIO became EDOM and the log got "Checksum mismatch" lines for data that is fine, for example on every read from a disk that has just been removed. Verify checksums only when the reads succeeded.

Tested: new test_read_error_is_not_edom in test_blockstore_v1 (csum_block_size 16k and 4k) and test_blockstore: it fails reads from the data area with EIO and expects EIO back. Both fail without the fix (EDOM) and pass with it; the rest of both suites pass.

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description Both stores verified the checksums of a read even when its I/O failed, over a buffer the read never filled. The check then failed, EIO became EDOM and the log got "Checksum mismatch" lines for data that is fine, for example on every read from a disk that has just been removed. Verify checksums only when the reads succeeded. Tested: new `test_read_error_is_not_edom` in test_blockstore_v1 (csum_block_size 16k and 4k) and test_blockstore: it fails reads from the data area with EIO and expects EIO back. Both fail without the fix (EDOM) and pass with it; the rest of both suites pass. ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-23 21:50:00 +03:00
Both stores verified the checksums of a read even when its I/O failed,
over a buffer the read never filled. The check then failed, EIO became
EDOM and the log got "Checksum mismatch" lines for data that is fine,
for example on every read from a disk that has just been removed.
Verify checksums only when the reads succeeded.
vitalif merged commit 14c1341213 into master 2026-11-24 03:46:48 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#166
No description provided.