Skip to content

Fix compilation under LOOP_CHECK_MODE - #13250

Merged
JosiahWI merged 1 commit into
apache:masterfrom
JosiahWI:fix/loop-check-mode
Jun 10, 2026
Merged

Fix compilation under LOOP_CHECK_MODE#13250
JosiahWI merged 1 commit into
apache:masterfrom
JosiahWI:fix/loop-check-mode

Conversation

@JosiahWI

@JosiahWI JosiahWI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

In earlier work, vol was renamed to stripe throughout the cache. A few occurences of vol were missed because they are conditionally compiled. This patch renames vol to stripe within code switched by the LOOP_CHECK_MODE definition.

I compiled with LOOP_CHECK_MODE, confirmed the compilation failure in master, and confirmed the fix. I also ran the CacheDir tests, which passed. It would have been better to run some AuTests as well for this patch, but I don't have a way to run them on my setup yet.

In earlier work, `vol` was renamed to `stripe` throughout the cache.
A few occurences of `vol` were missed because they are conditionally compiled.
This patch renames `vol` to `stripe` within code switched by the
`LOOP_CHECK_MODE` definition.
@JosiahWI JosiahWI added this to the 11.0.0 milestone Jun 9, 2026
@JosiahWI
JosiahWI requested a review from masaori335 June 9, 2026 12:25
@JosiahWI JosiahWI self-assigned this Jun 9, 2026
Copilot AI review requested due to automatic review settings June 9, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes build failures when compiling ATS with LOOP_CHECK_MODE enabled by completing the earlier volstripe rename in conditionally-compiled cache directory code paths.

Changes:

  • Update LOOP_CHECK_MODE unit-test code to use stripe/stripe->directory instead of vol.
  • Fix a remaining vol reference in dir_clean_bucket() under LOOP_CHECK_MODE.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/iocore/cache/unit_tests/test_CacheDir.cc Renames vol references to stripe in LOOP_CHECK_MODE-guarded test paths (with one segment-index bug to fix).
src/iocore/cache/CacheDir.cc Replaces an invalid vol->directory reference with stripe->directory in LOOP_CHECK_MODE code.

// freelist_length in freelist with loop
dir_corrupt_bucket(dir_from_offset(vol->header->freelist[s], seg1), s1, vol);
vol->directory.freelist_length(s1);
dir_corrupt_bucket(dir_from_offset(stripe->directory.header->freelist[s], seg1), s1, stripe);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Completely out of scope.

@masaori335 masaori335 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for fixing this. Seems I ignored code in this ifdef in the past.

@JosiahWI
JosiahWI merged commit 77253da into apache:master Jun 10, 2026
15 checks passed
@JosiahWI
JosiahWI deleted the fix/loop-check-mode branch June 10, 2026 01:44
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
In earlier work, `vol` was renamed to `stripe` throughout the cache.
A few occurences of `vol` were missed because they are conditionally compiled.
This patch renames `vol` to `stripe` within code switched by the
`LOOP_CHECK_MODE` definition.
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
In earlier work, `vol` was renamed to `stripe` throughout the cache.
A few occurences of `vol` were missed because they are conditionally compiled.
This patch renames `vol` to `stripe` within code switched by the
`LOOP_CHECK_MODE` definition.

(cherry picked from commit 77253da)
@cmcfarlen cmcfarlen moved this to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from Picked v10.2.0 to For v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

4 participants