-
Notifications
You must be signed in to change notification settings - Fork 0
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
Better handle filesystem optional features. #66
base: main
Are you sure you want to change the base?
Conversation
Filesystems (e.g. ext4, xfs) sometimes receive new features. When these features are enabled, anything that loads the filesystem (e.g. kernel, grub, etc.) must support the new feature or it will refuse to load it. When formatting a new partition, there are a few considerations for if a filesystem feature should be enabled: - Does the version of mkfs support that feature? - Does the build host kernel support that feature? - Does the target OS support that feature? This change ensure that all these considerations are handled correctly for the ext4 and xfs filesystem types.
@@ -433,7 +423,7 @@ func WaitForDevicesToSettle() error { | |||
} | |||
|
|||
// CreatePartitions creates partitions on the specified disk according to the disk config | |||
func CreatePartitions(diskDevPath string, disk configuration.Disk, rootEncryption configuration.RootEncryption, | |||
func CreatePartitions(targetOs targetos.TargetOs, diskDevPath string, disk configuration.Disk, rootEncryption configuration.RootEncryption, |
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.
An opinion here, since this is a new repo, there is a chance that as time goes on, we might end up adding more and more options here.
How about we have a struct with default values, and on top of that struct we implement a method CreateParititions
.
This might help us in only modifying the code at a single place where we have the initial struct and the rest of the code might not need any modifications :)
Just an opinion
Filesystems (e.g. ext4, xfs) sometimes receive new features. When these features are enabled, anything that loads the filesystem (e.g. kernel, grub, etc.) must support the new feature or it will refuse to load it.
When formatting a new partition, there are a few considerations for if a filesystem feature should be enabled:
This change ensure that all these considerations are handled correctly for the ext4 and xfs filesystem types.
Checklist