Skip to content

DAOS-17321 ddb: Checksum management with vos API#18287

Closed
knard38 wants to merge 2 commits into
masterfrom
ckochhof/dev/master/daos-17321/patch-001
Closed

DAOS-17321 ddb: Checksum management with vos API#18287
knard38 wants to merge 2 commits into
masterfrom
ckochhof/dev/master/daos-17321/patch-001

Conversation

@knard38
Copy link
Copy Markdown
Contributor

@knard38 knard38 commented May 19, 2026

Description

TODO

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).

@knard38 knard38 self-assigned this May 19, 2026
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-17321/patch-001 branch from 2fd6d30 to 0c45695 Compare May 19, 2026 14:53
@github-actions
Copy link
Copy Markdown

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

Fix resource leak in io_sgl_fetch(): move d_sgl_fini() before the error
check so the SGL is freed regardless of vos_obj_update() return code.

Fix missing newline in two D_PRINT() calls in vos_tests.c.

Apply clang-format alignment to VOS_OF_* enum in vos_types.h to fix
pre-existing clang-format non-conformance.

Reformat io_test_init_csummer() in vts_io.c to match clang-format style.

Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-17321/patch-001 branch from 0c45695 to 998a14f Compare May 19, 2026 17:43
Add VOS_OF_FETCH_CSUM (1 << 21) flag to vos_fetch_begin() allowing
callers to retrieve per-extent checksum metadata without fetching the
actual data. This is intended for the ddb (DAOS Debugger) tool which
needs to inspect and manage checksums stored in VOS.

When VOS_OF_FETCH_CSUM is set:
- SGL/bio-buffer allocation is skipped (like VOS_OF_FETCH_SIZE_ONLY).
- For single-value records: save_csum() is called, then the data fetch
  is skipped. iod_size is not updated.
- For array records: save_csum() is called as normal, and the full
  stored extent bounds (en_ext) plus epoch are saved via save_recx()
  so that callers get the raw per-version extent list paired with
  their checksums via vos_ioh2recx_list() and vos_ioh2ci().

VOS_OF_FETCH_CSUM and VOS_OF_FETCH_RECX_LIST are mutually exclusive
since both write ic_recx_lists with incompatible semantics. An explicit
-DER_INVAL check is added in vos_ioc_create() (in addition to the
existing D_ASSERT in the hot path).

Add unit tests for the new flag:
- VOS400.1: Fetch checksum of a single-value record (CRC64).
- VOS401.1: Fetch checksums of overlapping array extents (CRC16).

Features: recovery
Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
@knard38 knard38 force-pushed the ckochhof/dev/master/daos-17321/patch-001 branch from 998a14f to 2a922ea Compare May 19, 2026 19:12
@knard38 knard38 closed this May 19, 2026
@knard38 knard38 reopened this May 19, 2026
@knard38 knard38 closed this May 19, 2026
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.

2 participants