Skip to content

erofs: Switch default format version from V2 to V1 - #330

Merged
cgwalters merged 1 commit into
composefs:mainfrom
cgwalters:switch-v1-default
Jun 29, 2026
Merged

cgwalters merged 1 commit into
composefs:mainfrom
cgwalters:switch-v1-default

Conversation

@cgwalters

Copy link
Copy Markdown
Collaborator

This is one of the goals in getting to composefs-rs 1.0.

V1 is compatible with both C mkcomposefs 1.0.8 and composefs-rs, making it the better default for interoperability. V2 remains available for users who need it.

For backward compatibility, old repositories that lack an explicit erofs_formats field in meta.json continue to use V2 via a separate serde default (legacy_erofs_default), ensuring they are not silently reinterpreted as V1.

Tests that validate specific V2 behavior (directory entry assertions without whiteout stubs, V2-only OCI image refs, digest stability pinning) now use V2 explicitly.

Closes: #327
Assisted-by: opencode (Claude claude-opus-4-6)

@cgwalters
cgwalters force-pushed the switch-v1-default branch from db35bc4 to 0d6cf4a Compare June 26, 2026 12:25
This is one of the goals in getting to composefs-rs 1.0.

V1 is compatible with both C mkcomposefs 1.0.8 and composefs-rs,
making it the better default for interoperability. V2 remains
available for users who need it.

For backward compatibility, old repositories that lack an explicit
erofs_formats field in meta.json continue to use V2 via a separate
serde default (legacy_erofs_default), ensuring they are not silently
reinterpreted as V1.

Tests that validate specific V2 behavior (directory entry assertions
without whiteout stubs, V2-only OCI image refs, digest stability
pinning) now use V2 explicitly.

Closes: composefs#327
Assisted-by: opencode (Claude claude-opus-4-6)
Signed-off-by: Colin Walters <[email protected]>
)
.read()?;

// cstor dumpfile: `cfsctl oci dump --bootable @<config>`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some random deleted comments here.

@alexlarsson alexlarsson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some imho unnecessary comment deletions, but otherwise lgtm

@cgwalters
cgwalters added this pull request to the merge queue Jun 29, 2026
Merged via the queue into composefs:main with commit 080f925 Jun 29, 2026
33 of 35 checks passed
jmarrero added a commit to jmarrero/bootc that referenced this pull request Jul 20, 2026
After composefs-rs switched the default EROFS format from V2 to V1
(composefs/composefs-rs#330), get_ensure_composefs() fails because
init_path() refuses to re-initialize an existing V2 repo with V1.

Fix by trying open_path() first, which respects whatever format is
on disk. Fall back to init_path() only for fresh directories, and
open_upgrade() for pre-meta.json repos.

Add a TMT integration test that exercises repeated unified-storage
upgrades on an ostree system, validating that get_ensure_composefs()
correctly reopens the existing composefs repo.

Assisted-by: opencode (Claude claude-opus-4-6)
Signed-off-by: Joseph Marrero Corchado <[email protected]>
jmarrero added a commit to jmarrero/bootc that referenced this pull request Jul 21, 2026
After composefs-rs switched the default EROFS format from V2 to V1
(composefs/composefs-rs#330), get_ensure_composefs() fails because
init_path() refuses to re-initialize an existing V2 repo with V1.

Fix by trying open_path() first, which respects whatever format is
on disk. Fall back to init_path() only for fresh directories, and
open_upgrade() for pre-meta.json repos.

Assisted-by: opencode (Claude claude-opus-4-6)
Signed-off-by: Joseph Marrero Corchado <[email protected]>
jmarrero added a commit to jmarrero/bootc that referenced this pull request Jul 21, 2026
After composefs-rs switched the default EROFS format from V2 to V1
(composefs/composefs-rs#330), get_ensure_composefs() fails because
init_path() refuses to re-initialize an existing V2 repo with V1.

Fix by trying open_path() first, which respects whatever format is
on disk. Fall back to init_path() only for fresh directories, and
open_upgrade() for pre-meta.json repos.

Assisted-by: opencode (Claude claude-opus-4-6)
Signed-off-by: Joseph Marrero Corchado <[email protected]>
pull Bot pushed a commit to wizzywizard65/bootc that referenced this pull request Jul 23, 2026
After composefs-rs switched the default EROFS format from V2 to V1
(composefs/composefs-rs#330), get_ensure_composefs() fails because
init_path() refuses to re-initialize an existing V2 repo with V1.

Fix by trying open_path() first, which respects whatever format is
on disk. Fall back to init_path() only for fresh directories, and
open_upgrade() for pre-meta.json repos.

Assisted-by: opencode (Claude claude-opus-4-6)
Signed-off-by: Joseph Marrero Corchado <[email protected]>
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.

Switch over to v1 format by default

2 participants