diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-21 13:59:34 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-21 13:59:34 -0500 |
| commit | 9600d3df3e1b75cff0e3ecd20ae3ca2fe393eb8b (patch) | |
| tree | 9e93670ab016c8e60d4e8894b8cf7e9154398734 /sys/kern/vfs_init.c | |
| parent | 794b3671ed636c4fb8a74e1cf3a636272d4fa3d9 (diff) | |
kern: vfs: Decouple mounting from initialization
Upon bootup, all filesystems are to be enumerated and initialized before
they are mounted. Some filesystems may decide to mount themselves right
away. However, it is crucial to keep mounting and initialization
seperate.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_init.c')
| -rw-r--r-- | sys/kern/vfs_init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 6372f3d..08be17a 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -87,18 +87,17 @@ vfs_init(void) continue; } - /* Mount if we can */ - if (ops->mount != NULL) { - error = ops->mount(fip, NULL); + /* Initialize the filesystem */ + if (ops->init != NULL) { + error = ops->init(fip); } if (error != 0) { - dtrace("failed to mount %s\n", fip->name); + dtrace("failed to init %s\n", fip->name); continue; } - dtrace("mounted %s\n", fip->name); - fip->is_mounted = 1; + dtrace("initialized %s\n", fip->name); ++mount_count; } |
