Commit Graph

8 Commits

Author SHA1 Message Date
Andreas Kling
b020a5e7ce Kernel: Don't create a String every time we look up a Custody by name 2019-08-25 06:45:14 +02:00
Andreas Kling
9104d32341 Kernel: Use range-for with InlineLinkedList 2019-08-08 13:40:58 +02:00
Andreas Kling
318068fe1b Kernel: Turns global Custody and Inode tables into InlineLinkedLists
Yet more of this same thing. Each one of these patches has a small but
noticeable impact on the steady-state kmalloc numbers. :^)
2019-08-08 11:11:22 +02:00
Andreas Kling
90b1354688 AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr. 2019-06-21 18:37:47 +02:00
Andreas Kling
bc951ca565 Kernel: Run clang-format on everything. 2019-06-07 11:43:58 +02:00
Andreas Kling
8adadf8a46 FileSystem: Reuse existing custodies when possible, and keep them updated.
Walk the custody cache and try to reuse an existing one when possible.
The VFS is responsible for updating them when something happens that would
cause the described relationship to change.

This is definitely not perfect but it does work for the basic scenarios like
renaming and removing directory entries.
2019-05-31 15:22:52 +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