Commit Graph

19 Commits

Author SHA1 Message Date
Andreas Kling
eced5f11e3 Add CoreInode::reverse_lookup().
Getting the absolute path of an ext2fs inode now uses the lookup cache
which makes it a lot faster.
2018-11-15 17:04:55 +01:00
Andreas Kling
5f434bc00b Add CoreInode::lookup() for directory lookups.
Also add a name-to-inode lookup cache to Ext2Inode. This seems like a great
speedup for filesystem traversal.
2018-11-15 16:38:43 +01:00
Andreas Kling
8fa2d7104a More VFS cleanup. 2018-11-15 16:04:25 +01:00
Andreas Kling
396a32835b A pass of style/naming cleanup in VFS. 2018-11-15 15:10:30 +01:00
Andreas Kling
c735c56e4c More work on CoreInode. 2018-11-13 23:44:54 +01:00
Andreas Kling
26852a8363 Add metadata to CoreInode. 2018-11-13 13:32:16 +01:00
Andreas Kling
10c470e95f Make page_in_from_vnode 2x faster.
...by adding a new class called Ext2Inode that inherits CoreInode.
The idea is that a vnode will wrap a CoreInode rather than InodeIdentifier.
Each CoreInode subclass can keep whatever caches they like.

Right now, Ext2Inode caches the list of block indices since it can be very
expensive to retrieve.
2018-11-13 13:02:39 +01:00
Andreas Kling
83172e6a4b Rename FileHandle to FileDescriptor. 2018-11-07 11:37:54 +01:00
Andreas Kling
8e640539ef Add an inode metadata cache to the ext2fs implementation. 2018-10-29 23:45:34 +01:00
Andreas Kling
1d4af51250 Add a VFS::absolutePath(InodeIdentifier).
This is pretty inefficient for ext2fs. We walk the entire block group
containing the inode, searching through every directory for an entry
referencing this inode.

It might be a good idea to cache this information somehow. I'm not sure
how often we'll be searching for it.

Obviously there are multiple caching layers missing in the file system.
2018-10-28 12:20:25 +01:00
Andreas Kling
2716a9e2d7 Greatly improve /proc/PID/stack by tracing the ebp frame chain.
I also added a generator cache to FileHandle. This way, multiple
reads to a generated file (i.e in a synthfs) can transparently
handle multiple calls to read() without the contents changing
between calls.

The cache is discarded at EOF (or when the FileHandle is destroyed.)
2018-10-27 00:14:24 +02:00
Andreas Kling
9171521752 Integrate ext2 from VFS into Kernel. 2018-10-17 10:57:23 +02:00
Andreas Kling
9cd0a34b5c BlockDevice -> DiskDevice.
BlockDevice was the wrong name for this abstraction, since a block device
is a type of file in a unix system, and we should use that name for that
concept in the fs implementation.
2018-10-16 11:21:49 +02:00
Andreas Kling
f608629704 Implement creating a new directory. 2018-10-16 00:35:03 +02:00
Andreas Kling
47fc6344ac Support the ext2 directory entry file_type field. 2018-10-15 01:57:57 +02:00
Andreas Kling
9528edab92 Move readEntireInode() up to FileSystem (from ext2.)
It's just a wrapper around multiple calls to readInodeBytes() now.
2018-10-15 00:16:14 +02:00
Andreas Kling
1f41a36c52 Add a Unix namespace for foo_t types.
This allows me to keep prototyping things on a random desktop machine,
even if that machine has its own ideas about foo_t types.
2018-10-14 22:57:57 +02:00
Andreas Kling
c94044a04a Work on POSIX-like read() and lseek() support. 2018-10-14 21:19:27 +02:00
Andreas Kling
5a30055157 Import all this stuff into a single repo called Serenity. 2018-10-10 11:53:07 +02:00