Skip to content

composefs-backend: Implement bootc usr-overlay#1643

Merged
cgwalters merged 1 commit intobootc-dev:mainfrom
Johan-Liebert1:composefs-usr-overlay
Sep 25, 2025
Merged

composefs-backend: Implement bootc usr-overlay#1643
cgwalters merged 1 commit intobootc-dev:mainfrom
Johan-Liebert1:composefs-usr-overlay

Conversation

@Johan-Liebert1
Copy link
Copy Markdown
Collaborator

Similar to ostree, mount a transient overlayfs on /usr

@bootc-bot bootc-bot bot requested a review from jeckersb September 24, 2025 08:18
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements the bootc usr-overlay command for the composefs backend, which creates a transient writable overlay on /usr. The changes look good and follow the pattern of other commands. I've identified a couple of areas for improvement: a typo in a new public function name, a more robust way to find the root mount point, and a simplification of some conditional compilation logic to improve maintainability. Overall, a solid addition.

Comment on lines +1287 to +1297
Opt::UsrOverlay => {
#[cfg(feature = "composefs-backend")]
if composefs_booted()?.is_some() {
composefs_usr_overlay()
} else {
usroverlay().await
}

#[cfg(not(feature = "composefs-backend"))]
usroverlay().await
}
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.

medium

The conditional compilation logic here is a bit redundant. The else branch for when composefs-backend is enabled is identical to the case where it's disabled. You can simplify this to improve readability and reduce duplication.

        Opt::UsrOverlay => {
            #[cfg(feature = "composefs-backend")]
            if composefs_booted()?.is_some() {
                return composefs_usr_overlay();
            }
            usroverlay().await
        }
@Johan-Liebert1 Johan-Liebert1 force-pushed the composefs-usr-overlay branch 2 times, most recently from 29f7499 to 5744139 Compare September 24, 2025 08:49
Copy link
Copy Markdown
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

@Johan-Liebert1 Johan-Liebert1 force-pushed the composefs-usr-overlay branch 2 times, most recently from 26194fb to e5e20d0 Compare September 25, 2025 04:55
Similar to ostree, mount a transient overlayfs on /usr

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@cgwalters cgwalters enabled auto-merge (rebase) September 25, 2025 18:01
@cgwalters cgwalters merged commit c05588c into bootc-dev:main Sep 25, 2025
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants