Skip to content

fix: retry fscache blob cull until cachefiles completes - #787

Open
Park-Jiyeonn wants to merge 1 commit into
containerd:mainfrom
Park-Jiyeonn:fix/fscache-cull
Open

fix: retry fscache blob cull until cachefiles completes#787
Park-Jiyeonn wants to merge 1 commit into
containerd:mainfrom
Park-Jiyeonn:fix/fscache-cull

Conversation

@Park-Jiyeonn

@Park-Jiyeonn Park-Jiyeonn commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Overview

Use nydusd's cull completion status during fscache teardown, and keep snapshot teardown state and blob metadata until cachefiles confirms reclamation.

Unmount EROFS before unbinding and culling, and make retries tolerate an already-unmounted mountpoint. Return a pending error without dropping the teardown marker when cull is incomplete.

Coordinate blob metadata publication with cache GC through a per-blob lifecycle. Skip a GC claim that overlaps a mount publication so a new mount cannot race with metadata removal.

Add client, teardown, pending-cull, and publication/GC lifecycle tests.

Related: Nydusd: fix: report fscache blob cull completion status #1993

Change Type

Please select the type of change your pull request relates to:

  • Bug Fix
  • Feature Addition
  • Documentation Update
  • Code Refactoring
  • Performance Improvement
  • Other (please describe)

Use nydusd's cull completion status during fscache teardown, and keep
snapshot teardown state and blob metadata until cachefiles confirms
reclamation.

Unmount EROFS before unbinding and culling, and make retries tolerate an
already-unmounted mountpoint. Return a pending error without dropping
the teardown marker when cull is incomplete.

Coordinate blob metadata publication with cache GC through a per-blob
lifecycle. Skip a GC claim that overlaps a mount publication so a new
mount cannot race with metadata removal.

Add client, teardown, pending-cull, and publication/GC lifecycle tests.

Signed-off-by: Park.Jiyeon <jiyeonnn2@icloud.com>
@Park-Jiyeonn

Copy link
Copy Markdown
Contributor Author

@Zephyrcf PTAL, thx!

@imeoer

imeoer commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Two blockers as it stands:

  1. /api/v2/blobs/cull doesn't exist in nydusd yet. Once this lands, any fscache user running a current nydusd gets a 404 out of sharedErofsUmount and the unmount fails. The nydusd side needs to be released first, and we need a fallback to the old UnbindBlob("", fscacheID) path when the endpoint isn't there.
  2. Lint is red: snapshot/cleanup_queue.go:166:44: (*snapshotCleanupQueue).resume - reason always receives "fscache-cull-complete" (unparam). The branch also conflicts with main now.

Separately — this is 1200+ lines doing at least four independent things: the new cull client API, the umount/unbind reordering in sharedErofsUmount, the fscacheBlobLifecycle epoch machinery, and the cleanup queue retry. The reordering fix stands on its own and could go in right away. Would you mind splitting it out?

Also note Filesystem.RemoveCache changes signature from error to (bool, error) — that's an exported API break and should be called out in the description.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants