Commit Graph

113 Commits

Author SHA1 Message Date
Andreas Kling
056a7fea08 FileSystem: Rename VFS::resolve_path_to_custody() => resolve_path(). 2019-05-31 15:30:09 +02:00
Andreas Kling
e6a8133b0c FileSystem: Merge symlink following logic into path resolution.
When encountering a symlink, we abandon the custody chain we've been working
on and start over with a new one (by recursing into a new resolution call.)
Caching symlinks in the custody model would be incredibly difficult to get
right with all the extra invalidation it would require, so let's just not.
2019-05-31 06:42:49 +02:00
Andreas Kling
709d168807 FileSystem: Get rid of VFS::resolve_path().
The only remaining client was resolve_symbolic_link() which now deals in
custodies instead.
2019-05-30 22:30:29 +02:00
Andreas Kling
874bffc729 FileSystem: Get rid of VFS::absolute_path() and teach Mount about custodies. 2019-05-30 22:30:29 +02:00
Andreas Kling
8e83aac8a3 FileSystem: Get rid of VFS::resolve_path_to_inode() and old_resolve_path(). 2019-05-30 22:30:29 +02:00
Andreas Kling
393851418b FileSystem: Port most of the code over to using custodies.
The current working directory is now stored as a custody. Likewise for a
process executable file. This unbreaks /proc/PID/fd which has not been
working since we made the filesystem bigger.

This still needs a bunch of work, for instance when renaming or removing
a file somewhere, we have to update the relevant custody links.
2019-05-30 18:58:59 +02:00
Andreas Kling
4cb87b1753 FileSystem: Add a Custody class that represents a parent/child guardianship.
A custody is kind of a directory entry abstraction that represents a single
entry in a parent directory that tells us the name of a child inode.

The idea here is for path resolution to produce a chain of custody objects.
2019-05-30 17:46:08 +02:00
Robin Burchell
0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling
8b249bd09b Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program. 2019-05-03 22:59:58 +02:00
Andreas Kling
13041f894f Kernel: Start using StringView in the VFS class.
The less kmalloc() we can do, the better. Calling kmalloc() disables all
interrupts while it runs, so it's directly affecting responsiveness.
2019-04-15 14:57:27 +02:00
Andreas Kling
37ae00a4dd Kernel+Userland: Add the rename() syscall along with a basic /bin/mv. 2019-04-07 23:35:26 +02:00
Andreas Kling
58c4d41c5f Kernel: Remove Limits.h 2019-04-03 13:18:42 +02:00
Andreas Kling
f9864940eb Kernel: Move FS-related files into Kernel/FileSystem/ 2019-04-03 12:25:24 +02:00