-
Notifications
You must be signed in to change notification settings - Fork 137
composefs-backend: Implement bootc usr-overlay
#1643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
composefs-backend: Implement bootc usr-overlay
#1643
Conversation
There was a problem hiding this 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.
Opt::UsrOverlay => { | ||
#[cfg(feature = "composefs-backend")] | ||
if composefs_booted()?.is_some() { | ||
composefs_usr_overlay() | ||
} else { | ||
usroverlay().await | ||
} | ||
|
||
#[cfg(not(feature = "composefs-backend"))] | ||
usroverlay().await | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
}
29f7499
to
5744139
Compare
There was a problem hiding this 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!
26194fb
to
e5e20d0
Compare
e5e20d0
to
b306908
Compare
Similar to ostree, mount a transient overlayfs on /usr Signed-off-by: Pragyan Poudyal <[email protected]>
b306908
to
914dbca
Compare
Similar to ostree, mount a transient overlayfs on /usr