Commit graph

3 commits

Author SHA1 Message Date
implicitfield
a69e113d49 Kernel: Add a definition for the FAT32 FSInfo structure 2024-02-24 15:54:52 -07:00
implicitfield
8b77737f8e Kernel: Move FAT structure definitions to Kernel/API
We need to be able to include these definitions from userspace as the
upcoming mkfs.fat utility will depend on these.
2024-02-24 15:54:52 -07:00
Liav A
23a7ccf607 Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls
This is a preparation before we can create a usable mechanism to use
filesystem-specific mount flags.
To keep some compatibility with userland code, LibC and LibCore mount
functions are kept being usable, but now instead of doing an "atomic"
syscall, they do multiple syscalls to perform the complete procedure of
mounting a filesystem.

The FileBackedFileSystem IntrusiveList in the VFS code is now changed to
be protected by a Mutex, because when we mount a new filesystem, we need
to check if a filesystem is already created for a given source_fd so we
do a scan for that OpenFileDescription in that list. If we fail to find
an already-created filesystem we create a new one and register it in the
list if we successfully mounted it. We use a Mutex because we might need
to initiate disk access during the filesystem creation, which will take
other mutexes in other parts of the kernel, therefore making it not
possible to take a spinlock while doing this.
2023-07-02 01:04:51 +02:00