Skip to content

sdk/rust: Fix overlayfs whiteout for base files in promoted dirs - #316

Merged
penberg merged 1 commit into
tursodatabase:mainfrom
broady:fix/overlayfs-whiteout-promoted-dirs
Feb 18, 2026
Merged

penberg merged 1 commit into
tursodatabase:mainfrom
broady:fix/overlayfs-whiteout-promoted-dirs

Conversation

@broady

@broady broady commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

When a base-layer file is unlinked or renamed inside a directory
that has been promoted from Base to Delta (via ensure_parent_dirs),
we correctly create a whiteout at the source path.

However, the deleted name could still reappear in listings:
post-unlink inode operations (e.g. utimens on a stale inode handle)
could copy the base file into delta, and readdir/readdir_plus only
applied whiteout filtering to base entries, not delta entries.

This caused failures like:

  • readdir still showing HEAD after unlink in promoted .git/
  • whiteouted base names being resurrected through delta merges

Fix by:

  1. Applying whiteout filtering to delta entries in both readdir()
    and readdir_plus(), so whiteouts are authoritative across the
    merged overlay view.

  2. Treating whiteouted paths as not found for inode-based operations:
    getattr/readlink return no entry, and open/chmod/chown/utimens
    return ENOENT semantics instead of copy-up.

  3. Preserving existing promoted-parent whiteout behavior for unlink,
    rmdir, and rename source paths.

Add/keep test coverage for promoted-parent unlink/rename and the
overlay readdir/unlink integration path under cli/tests.

@broady
broady force-pushed the fix/overlayfs-whiteout-promoted-dirs branch from f06ffb3 to c80f682 Compare February 9, 2026 04:02
@broady

broady commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

ah, the test is failing because of a separate fuse issue - cached directory entries, I'll try to address that issue separately (bug/PR)

@broady

broady commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

FUSE cli integration test blocked on #317

@broady
broady force-pushed the fix/overlayfs-whiteout-promoted-dirs branch from c80f682 to 54e4a17 Compare February 13, 2026 19:35
@broady

broady commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

ready to review/merge @penberg

@broady
broady force-pushed the fix/overlayfs-whiteout-promoted-dirs branch 3 times, most recently from 7802d77 to bf19e2b Compare February 15, 2026 05:56
broady added a commit to broady/agentfs that referenced this pull request Feb 15, 2026
Revert FUSE/CLI and integration-test changes from this branch so PR tursodatabase#316
contains only sdk/rust overlay semantics changes.
@broady
broady force-pushed the fix/overlayfs-whiteout-promoted-dirs branch from 1aba346 to c1fed43 Compare February 15, 2026 06:41
@broady
broady force-pushed the fix/overlayfs-whiteout-promoted-dirs branch from c1fed43 to 2eed2f1 Compare February 15, 2026 06:55
@penberg
penberg merged commit cc718f4 into tursodatabase:main Feb 18, 2026
34 checks passed
@broady
broady deleted the fix/overlayfs-whiteout-promoted-dirs branch February 21, 2026 04:18
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