Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quincy: osd: full-object read CRC mismatch due to 'truncate' modifying oi.size w/o clearing 'data_digest' #57587

Open
wants to merge 5 commits into
base: quincy
Choose a base branch
from

Conversation

NitzanMordhai
Copy link
Contributor

backport tracker: https://tracker.ceph.com/issues/66138


backport of #55008
parent tracker: https://tracker.ceph.com/issues/53240

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

jiawd and others added 5 commits May 21, 2024 05:17
…e and forget to clear data_digest

when write before truncate, need trim length, if truncate is to 0,
write is [0~128k], write change to [0~0], do nothing, oi.size is 0, x1 = set_data_digest(crc32(-1)).
write is [128k~128k], write change to [128k~0], truncate oi.size to offset 128k, x2 = set_data_digest(crc32(x1)).
write is [256k~128k], write change to [256k~0], truncate oi.size to offset 256k, x3 = set_data_digest(crc32(x2)).
...
write is [4063232~128k], write change to [4063232~0], truncate oi.size to offset 4063232, xn = set_data_digest(crs32(xn-1))
Now, we can see oi.size is 4063232, and data_digest is 0xffffffff, because thelength of in_data of crc is 0 every time.
when read verify crc will reply EIO. (EC pool).

so, when truncate in write, need clear data_digest and DIGEST flag,
when write before truncate, need to trim length, when offset over than oi.size, don't truncate oi.size to offset.

Fixes: https://tracker.ceph.com/issues/53240
Signed-off-by: jiawd <jiawendong@xtaotech.com>
(cherry picked from commit aeafd2e)
Fixes: https://tracker.ceph.com/issues/53240
Signed-off-by: jiawd <jiawendong@xtaotech.com>
(cherry picked from commit 83d3523)
Fixes: https://tracker.ceph.com/issues/53240
Signed-off-by: jiawd <jiawendong@xtaotech.com>
(cherry picked from commit afd4266)
Add test for zero crc check failed.

Fixes: https://tracker.ceph.com/issues/53240
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit 6662e6b)
1. adding allow_ec_overwrite option for cxx test
2. adding new test for crc failuer check with append zero length

Fixes: https://tracker.ceph.com/issues/53240
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit 06e4c6f)
@NitzanMordhai NitzanMordhai requested a review from a team as a code owner May 21, 2024 05:17
@NitzanMordhai NitzanMordhai added this to the quincy milestone May 21, 2024
@github-actions github-actions bot added the tests label May 21, 2024
Copy link
Contributor

@Matan-B Matan-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@athanatos
Copy link
Contributor

Do not merge this until https://tracker.ceph.com/issues/66226 is fixed -- the newly added EC test along with 3 others in ceph_test_rados_api_io_pp seem to fail every time.

@rzarzynski rzarzynski added the DNM label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants