Skip to content

DAOS-17321 ddb: Add checksum dump function to ddb VOS API#18444

Open
knard38 wants to merge 1 commit into
masterfrom
ckochhof/dev/master/daos-17321/patch-002
Open

DAOS-17321 ddb: Add checksum dump function to ddb VOS API#18444
knard38 wants to merge 1 commit into
masterfrom
ckochhof/dev/master/daos-17321/patch-002

Conversation

@knard38
Copy link
Copy Markdown
Contributor

@knard38 knard38 commented Jun 5, 2026

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 using VOS_OF_FETCH_CSUM and delivers it to the caller via a callback. Passing NULL as the callback is a valid no-op.

The function dispatches on akey type:

  • Single-value akeys (dump_csum_sv): always fetches at DAOS_EPOCH_MAX (single values have one record per epoch). The callback receives rel=NULL and the dcs_ci_list.
  • Array akeys (dump_csum_recx): fetches at the caller-specified epoch. The callback receives both the daos_recx_ep_list (one entry per stored extent, as reported by VOS_OF_FETCH_CSUM) and the dcs_ci_list.

Validation

A new test fixture (dt_csum_ctx) is introduced in ddb_test_driver.c, with a dedicated container, csummer, and two objects:

  • g_oids[0]: data written without checksum
  • g_oids[1]: data written with checksum (CRC64, 4KB chunks)

Three new test cases in ddb_vos_tests.c:

Test What it covers
dump_csum_error_tests Invalid pool handle → vos_cont_open failure propagation
dump_csum_sv_tests SV path: no-csum, with-csum, null callback, callback error propagation
dump_csum_recx_tests Array path: no-csum, with-csum, null callback, callback error propagation

The csum_cb_return_rc helper (takes return code via cb_args) verifies that non-zero callback return codes are forwarded to the caller. A key non-obvious property: VOS_OF_FETCH_CSUM records 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:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Ticket title is 'Checksum management with ddb'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-17321

@knard38 knard38 marked this pull request as ready for review June 5, 2026 13:07
@knard38 knard38 requested review from Nasf-Fan, NiuYawei and janekmi June 5, 2026 13:07
@daosbuild3
Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants