Skip to content

[4/7] feat: add file_clone option for reflink-based disk cache#4

Open
mmastrac wants to merge 1 commit intovercel/opendal-upgrade-artifactsfrom
vercel/file-clone-reflink
Open

[4/7] feat: add file_clone option for reflink-based disk cache#4
mmastrac wants to merge 1 commit intovercel/opendal-upgrade-artifactsfrom
vercel/file-clone-reflink

Conversation

@mmastrac
Copy link
Copy Markdown
Collaborator

Summary

Cherry-picked from upstream PR mozilla#2640.

  • Adds file_clone option for the disk cache that stores entries as uncompressed files
  • Restores cached artifacts using filesystem reflinks (clonefile() on APFS, FICLONE on Linux)
  • When supported, restored artifacts share underlying storage blocks with the cache entry
  • Configure with SCCACHE_FILE_CLONE=true or file_clone = true in [cache.disk] config
  • Automatic fallback to compressed format when reflinks are not supported

Stack: 4/6

Upstream: mozilla#2640

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 31, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedreflink-copy@​0.1.249910093100100

View full report

@mmastrac mmastrac changed the base branch from vercel/opendal-upgrade-artifacts to vercel/02-opendal-upgrade-artifacts March 31, 2026 17:28
@mmastrac mmastrac changed the title feat: add file_clone option for reflink-based disk cache [3/5] feat: add file_clone option for reflink-based disk cache Mar 31, 2026
@mmastrac mmastrac changed the base branch from vercel/02-opendal-upgrade-artifacts to vercel/opendal-upgrade-artifacts March 31, 2026 17:30
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 5344dad to f487cc2 Compare March 31, 2026 17:35
@mmastrac mmastrac changed the title [3/5] feat: add file_clone option for reflink-based disk cache [4/6] feat: add file_clone option for reflink-based disk cache Mar 31, 2026
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from f487cc2 to a7bc6d3 Compare March 31, 2026 17:38
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 098874e to 207b92c Compare March 31, 2026 17:38
@mmastrac mmastrac changed the title [4/6] feat: add file_clone option for reflink-based disk cache [4/7] feat: add file_clone option for reflink-based disk cache Mar 31, 2026
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from a7bc6d3 to e49e0d7 Compare March 31, 2026 18:03
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch 2 times, most recently from 785b0f4 to 67a6fa7 Compare March 31, 2026 18:23
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from e49e0d7 to 52be489 Compare March 31, 2026 18:23
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 67a6fa7 to 5c05a47 Compare March 31, 2026 22:05
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 52be489 to 4801769 Compare March 31, 2026 22:05
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 5c05a47 to af3b21e Compare April 1, 2026 18:01
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 4801769 to 7991e34 Compare April 1, 2026 18:01
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from af3b21e to c8f18e9 Compare April 1, 2026 20:55
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 7991e34 to 82cae86 Compare April 1, 2026 20:55
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from c8f18e9 to d0fc366 Compare April 1, 2026 21:02
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 82cae86 to 822f6cc Compare April 1, 2026 21:02
Cherry-picked from upstream PR mozilla#2640.

Adds a file_clone option for the disk cache that stores cache entries
as uncompressed files and restores them using filesystem reflinks
(clonefile() on APFS, FICLONE on Linux). When supported, restored
artifacts share underlying storage blocks with the cache entry.

Configure with SCCACHE_FILE_CLONE=true or file_clone = true in
[cache.disk] config.

Upstream: mozilla#2640

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 822f6cc to 5055c36 Compare April 2, 2026 00:52
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from d0fc366 to 27e8bca Compare April 2, 2026 00:52
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.

1 participant