composefs-backend: Implement bootc usr-overlay#1643
Conversation
There was a problem hiding this comment.
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.
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
cgwalters
left a comment
There was a problem hiding this comment.
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 <pragyanpoudyal41999@gmail.com>
b306908 to
914dbca
Compare
Similar to ostree, mount a transient overlayfs on /usr