Skip to content

[5/9] 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

[5/9] 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
Addedcargo/​reflink-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 2 times, most recently 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
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from 5055c36 to 614ab48 Compare April 2, 2026 16:22
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch 2 times, most recently from f832acd to b45d4e0 Compare April 2, 2026 16:24
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch 2 times, most recently from 3b1c8b7 to c2dfa44 Compare April 2, 2026 16:29
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from b45d4e0 to 75c3cdf Compare April 2, 2026 16:29
@mmastrac mmastrac changed the title [4/7] feat: add file_clone option for reflink-based disk cache [5/9] feat: add file_clone option for reflink-based disk cache Apr 2, 2026
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 75c3cdf to d8408b1 Compare April 2, 2026 17:18
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch 2 times, most recently from 67072e8 to e6a50c2 Compare April 7, 2026 18:12
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from d8408b1 to 88634f2 Compare April 7, 2026 18:12
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from e6a50c2 to cef13e5 Compare April 7, 2026 18:20
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 88634f2 to 141d34f Compare April 7, 2026 18:20
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from cef13e5 to ac7af77 Compare April 7, 2026 18:24
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 141d34f to 3b94df1 Compare April 7, 2026 18:24
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from ac7af77 to f0a0bdc Compare April 7, 2026 19:09
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 3b94df1 to 5d56579 Compare April 7, 2026 19:09
@mmastrac mmastrac force-pushed the vercel/opendal-upgrade-artifacts branch from 5d56579 to fef9b95 Compare April 16, 2026 21:35
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch 2 times, most recently from 3d1bc8f to cbf1ce6 Compare April 17, 2026 14:44
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/opendal-upgrade-artifacts branch from 0404395 to 4838c6d Compare April 17, 2026 15:08
@mmastrac mmastrac force-pushed the vercel/file-clone-reflink branch from cbf1ce6 to 035390b Compare April 17, 2026 15:09
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