DAOS-17321 ddb: Add checksum dump function to ddb VOS API#18444
Open
knard38 wants to merge 1 commit into
Open
Conversation
Add dv_dump_csum() to the ddb VOS API to expose checksum metadata stored in a VOS tree. The function fetches checksum info using VOS_OF_FETCH_CSUM and delivers it via a callback. Two akey types are handled: - Single-value: always fetched at DAOS_EPOCH_MAX; callback receives rel=NULL and the dcs_ci_list. - Array: fetched at the caller-specified epoch; callback receives both the daos_recx_ep_list and the dcs_ci_list. Passing dump_cb=NULL is a valid no-op. A new dt_csum_ctx test fixture is introduced with two objects (one with and one without checksums) and three test cases covering error paths, single-value csum retrieval, and array csum retrieval, including callback error propagation. Features: recovery Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
|
Ticket title is 'Checksum management with ddb' |
Collaborator
|
Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18444/1/execution/node/1311/log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
dv_dump_csum()to the ddb VOS API (ddb_vos.h/ddb_vos.c). The function fetches the stored checksum metadata for a given VOS tree path usingVOS_OF_FETCH_CSUMand delivers it to the caller via a callback. PassingNULLas the callback is a valid no-op.The function dispatches on akey type:
dump_csum_sv): always fetches atDAOS_EPOCH_MAX(single values have one record per epoch). The callback receivesrel=NULLand thedcs_ci_list.dump_csum_recx): fetches at the caller-specified epoch. The callback receives both thedaos_recx_ep_list(one entry per stored extent, as reported byVOS_OF_FETCH_CSUM) and thedcs_ci_list.Validation
A new test fixture (
dt_csum_ctx) is introduced inddb_test_driver.c, with a dedicated container, csummer, and two objects:g_oids[0]: data written without checksumg_oids[1]: data written with checksum (CRC64, 4KB chunks)Three new test cases in
ddb_vos_tests.c:dump_csum_error_testsvos_cont_openfailure propagationdump_csum_sv_testsdump_csum_recx_testsThe
csum_cb_return_rchelper (takes return code viacb_args) verifies that non-zero callback return codes are forwarded to the caller. A key non-obvious property:VOS_OF_FETCH_CSUMrecords the full stored extent (re_recx.rx_nr), not the intersection with the fetch IOD; this is documented in the test.Steps for the author:
After all prior steps are complete: