-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
lib/vfscore: Implement individual volume automounting #979
Conversation
cf7ce1b
to
a84192a
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.
This seems to work fine @mogasergiu, I'll add the tag after you resolve Simon's comments.
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.
Great work, @mogasergiu 💪 . I left some minor nitpicks.
I will approve after that!
0b15cc1
to
3d1e652
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.
I retested this and everything works fine, thanks!
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
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.
All good now. Thanks, @mogasergiu 🥇
Reviewed-by: Radu Nichita radunichita99@gmail.com
In preparation for individual volume auto-mounting to Unikraft[0], introduce a helper library to serialize command-line arguments representing the in-kernel mount path for a device and its options. [0]: unikraft/unikraft#979 Signed-off-by: Alexander Jung <alex@unikraft.io>
In preparation for individual volume auto-mounting to Unikraft[0], introduce a helper library to serialize command-line arguments representing the in-kernel mount path for a device and its options. [0]: unikraft/unikraft#979 Signed-off-by: Alexander Jung <alex@unikraft.io>
In preparation for individual volume auto-mounting to Unikraft[0], introduce a helper library to serialize command-line arguments representing the in-kernel mount path for a device and its options. [0]: unikraft/unikraft#979 Signed-off-by: Alexander Jung <alex@unikraft.io>
3b76779
to
27e582a
Compare
In preparation for individual volume auto-mounting to Unikraft[0], introduce a helper library to serialize command-line arguments representing the in-kernel mount path for a device and its options. [0]: unikraft/unikraft#979 Signed-off-by: Alexander Jung <alex@unikraft.io>
27e582a
to
926f080
Compare
926f080
to
3a616bc
Compare
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
I just noticed, that in your second commit that removes the config LIBVFSCORE_AUTOMOUNT_ROOTFS
bool "Automatically mount a root filesysytem (/)"
default n
-imply LIBUKLIBPARAM
help
- Automatically mounts '/' during boot. If `libuklibparam` is
- compiled in, the default root filesystem and mount options can
- be changed with the following library parameters:
- 'vfs.rootfs', 'vfs.rootdev', 'vfs.rootflags', and 'vfs.rootopts'
+ Automatically mounts '/' during boot. The parameters are
+ compiled-in and cannot be changed at runtime. This is a minor comment: Instead of keeping the parameters set from config options from line 76 to 98, you could directly fill the struct in line 226 with those. I aslo jsut notice that you are using |
Is this just general advice? The problem is if you do |
Provide a command-line argument `vfs.fstab` that is meant to contain a list of whitespace separated strings with the following format: ``` vfs.fstab=[ "<src_dev>:<mntpoint>:<fsdriver>[:<flags>:<opts>]" "<src_dev>:<mntpoint>:<fsdriver>[:<flags>:<opts>]" ... ] ``` The core will parse the provided strings as volume information and attempt to mount them accordingly, if `CONFIG_LIBVFSCORE_FSTAB` is provided. Furthermore, add a configurable `CONFIG_LIBVFSCORE_FSTAB_SIZE` option that will be used as the maximum amount of automatically mounted volumes, excluding the `rootfs` and modularize `initrd` extraction and mounting functionality into a standalone function to be used by both `fstab` and implicit `rootfs`. As a last change, since the file's functionality drastically changed, rename `rootfs.c` to `automount.c`. Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Now that we can dynamically mount any kind of volume through a more generic format through the commandline, there is an unnecessary overlap between `vfs.{rootfs, rootdef, rootops,rootflags}` and defining `rootfs` related arguments through `vfs.fstab` volumes. Therefore, deprecate `vfs.{rootfs, rootdef, rootops,rootflags}` in favor of `vfs.fstab`. Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
3a616bc
to
48caaa5
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 a lot for the work!
Reviewed-by: Simon Kuenzer simon@unikraft.io
Approved-by: Simon Kuenzer simon@unikraft.io
Now that we can dynamically mount any kind of volume through a more generic format through the commandline, there is an unnecessary overlap between `vfs.{rootfs, rootdef, rootops,rootflags}` and defining `rootfs` related arguments through `vfs.fstab` volumes. Therefore, deprecate `vfs.{rootfs, rootdef, rootops,rootflags}` in favor of `vfs.fstab`. Signed-off-by: Sergiu Moga <sergiu@unikraft.io> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #979
Provide a command-line argument
vfs.fstab
that is meant to contain a list of whitespace separated strings with the following format:The core will parse the provided strings as volume information and attempt to mount them accordingly.
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
x86_64
or N/A]kvm
,xen
or N/A]app-python3
or N/A]Additional configuration
Description of changes