Skip to content

Add Linux XFS loop storage fallback#41

Merged
adamziel merged 2 commits into
trunkfrom
xfs-volume
May 15, 2026
Merged

Add Linux XFS loop storage fallback#41
adamziel merged 2 commits into
trunkfrom
xfs-volume

Conversation

@JanJakes
Copy link
Copy Markdown
Contributor

@JanJakes JanJakes commented May 12, 2026

Summary

  • Add linux-xfs-loop as the Linux fallback after native FICLONE reflink probing fails.
  • Embed a compressed reflink-capable XFS image template and expand it as a sparse shared image under the ForkPress data directory.
  • Set up the shared Linux XFS volume with direct loop ioctls and mount(2)/umount2(2), avoiding runtime calls to mount, losetup, or mkfs.
  • Store each site in a stable per-site directory inside the shared XFS mount and expose public branch directories through symlinks.
  • Update storage status, mount, detach, server routing, docs, and e2e file-view expectations.

Notes

The fallback is viable but still requires loop-device and mount privileges on Linux, usually root or CAP_SYS_ADMIN. If those privileges are unavailable, ForkPress reports the setup failure and falls back to full file-copy materialization.

If XFS setup fails after this process mounted the shared image, ForkPress detaches that partial mount before considering file-copy fallback. If cleanup fails, setup returns the cleanup error instead of recording file-copy while leaving a shared XFS mount behind.

Validation

  • cargo check --target x86_64-unknown-linux-musl -p forkpress-storage
  • cargo check --target aarch64-unknown-linux-musl -p forkpress-storage
  • cargo check --target x86_64-unknown-linux-gnu -p forkpress-storage
  • cargo test --workspace --exclude forkpress-cli
  • FORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress-cli
  • FORKPRESS_RUNTIME_BUNDLE=/dev/null cargo test -p forkpress-cli --features dev-experiments --bin forkpress-dev
  • make test-all
  • Linux container: cargo test -p forkpress-storage
  • Privileged Linux container smoke test mounting the generated XFS image and verifying cp --reflink=always COW behavior

JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added a commit that referenced this pull request May 15, 2026
Present ForkPress as a ready product with concise install, branch, merge, Git, agent, storage, log, command, and build guidance. Remove outdated implementation-heavy sections and document the COW storage cascade including the Linux XFS loop fallback from PR #41.
JanJakes added 2 commits May 15, 2026 14:48
Use native reflinks first, then fall back on Linux to one shared reflink-capable XFS image mounted through direct loop ioctls and mount(2). Embed the compressed XFS template and route mounted branch storage through per-site directories inside the shared volume.
Keep automatic stop paths from detaching the shared XFS volume while another Linux XFS site is still running. Detect interrupted XFS setup from the mounted per-site directory even when site.toml is missing, and print deletion cleanup that includes the hidden per-site XFS data directory.
@adamziel adamziel marked this pull request as ready for review May 15, 2026 13:20
@adamziel adamziel merged commit e016205 into trunk May 15, 2026
12 checks passed
@adamziel adamziel deleted the xfs-volume branch May 15, 2026 13:21
This was referenced May 15, 2026
JanJakes added a commit that referenced this pull request May 15, 2026
## Release `v0.1.14`

Version bump and release metadata update for `v0.1.14`.

**Changelog draft:**
* Add remote-site cache branching
([#40](#40))
* Bootstrap Starlight documentation site
([#42](#42))
* Add COW mergeback and audit model
* Polish branch merge UI and harden audit follow-ups
* Guard COW row merges against target trigger rewrites
* Rewrite README and restructure documentation
([#47](#47))
* Add Linux XFS loop storage fallback
([#41](#41))
* Harden merge reliability gates and semantic coverage
([#46](#46))
* Automate release preparation and publishing
([#50](#50))
* Harden release prepare authentication
([#53](#53))
* Fix release prepare status parsing
([#54](#54))
* Polish release pull request handling
([#56](#56))
* Clarify release workflow stages

**Full changelog:**
v0.1.13-windows-cow.3...release/v0.1.14

## Next steps

1. **Review** the changes in this pull request.
2. **Push** any additional edits to this branch (`release/v0.1.14`).
3. **Merge** this pull request to publish `v0.1.14`.

Merging will automatically build ForkPress binaries, create a GitHub
release, and update the Homebrew formula.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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