Andreas Kling
dde8d90747
Ext2FS: Fix accidental zero-fill when appending to a file.
...
We were using the old file size, rather than the new file size, to determine
how much to zero-fill in the last block of a file.
2019-04-27 17:14:27 +02:00
Andreas Kling
44673c4f3b
Kernel: Add a write cache to DiskBackedFS.
...
This way you can spam small write()s on a file without the kernel writing
to disk every single time. Flushes are included in the FS::sync() operation
and will get triggered regularly by syncd. :^)
2019-04-25 22:05:53 +02:00
Andreas Kling
e0cdc5db0d
Ext2FS: Reduce debug spam in block allocation.
2019-04-25 22:05:32 +02:00
Andreas Kling
d5578826af
Kernel: Make it possible to look up FIFO's by ID.
...
This will be useful when implementing the /proc/PID/fd/N links where N is
a file descriptor referring to a FIFO.
2019-04-25 13:53:24 +02:00
Andreas Kling
ca9ed13643
Kernel: Simplify Device::open().
2019-04-24 02:20:14 +02:00
Andreas Kling
fd500c79d6
Ext2S: Fix off-by-one error in block allocation.
2019-04-23 16:38:45 +02:00
Andreas Kling
b041fc57de
Ext2FS: Bitmaps aren't always at full capacity.
...
Block bitmaps only have (blocks_per_group) entries, while inode bitmaps
only have (inodes_per_group) entries.
2019-04-23 16:21:07 +02:00
Andreas Kling
14ceabeca8
Ext2FS: More bitmap misunderstanding cleanups.
...
Inode bitmaps are also only ever one block.
2019-04-23 15:07:07 +02:00
Andreas Kling
1bf37db9a9
Ext2FS: Simplify block bitmap stuff.
...
Block bitmaps are only ever one block in size. I don't know why I thought
otherwise, but use this info to simplify the code. :^)
2019-04-23 14:51:47 +02:00
Andreas Kling
58240fdb33
Do a pass of compiler warning fixes.
...
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling
5c68929aa1
Kernel: Add a systrace() syscall and implement /bin/strace using it.
...
Calling systrace(pid) gives you a file descriptor with a stream of the
syscalls made by a peer process. The process must be owned by the same
UID who calls systrace(). :^)
2019-04-22 18:44:45 +02:00
Andreas Kling
c02c6fef28
Kernel+ProcessManager: Show per-process syscall counts.
...
Added a simple syscall counter to the /proc/all contents. :^)
2019-04-17 23:16:14 +02:00
Andreas Kling
33920df299
AK: Try to use StringViews more for substrings and splitting.
2019-04-16 02:39:16 +02:00
Andreas Kling
2533e0b57b
Kernel: Reduce kmallocing in /proc/all and /proc/memstat.
2019-04-16 00:36:17 +02:00
Andreas Kling
d384c7815f
Kernel: Make it possible to have kmalloc() dump call stacks.
...
This can be enabled at any time using a sysctl:
sysctl kmalloc_stacks=1
The stacks will go to the debugger output only.
2019-04-15 23:58:48 +02:00
Andreas Kling
e9c0f4567d
Kernel+ProcessManager: Expose the number of kmalloc/kfree calls.
...
This will be very helpful in tracking down unwanted kmalloc traffic. :^)
2019-04-15 19:43:12 +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
c0fe48635b
Kernel: Add /proc/uptime file (number of seconds since boot.)
...
Also added a simple /bin/uptime to pretty-print this information. :^)
2019-04-14 15:19:45 +02:00
Andreas Kling
3f6408919f
AK: Improve smart pointer ergonomics a bit.
2019-04-14 02:36:06 +02:00
Andreas Kling
29d0412a06
Kernel: Remove system.h and make the uptime global a qword.
2019-04-14 01:29:14 +02:00
Andreas Kling
60a819c14a
Kernel: Yet more work on bringing up POSIX SHM.
2019-04-09 02:37:38 +02:00
Andreas Kling
26a06f3fcd
Kernel: More work towards POSIX SHM, also add ftruncate().
2019-04-09 01:10:00 +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
644c887594
Kernel: Move FIFO into FileSystem/ and Socket+LocalSocket into Net/.
2019-04-06 20:29:48 +02:00
Andreas Kling
b9738fa8ac
Kernel: Move VM-related files into Kernel/VM/.
...
Also break MemoryManager.{cpp,h} into one file per class.
2019-04-03 15:13:07 +02:00
Andreas Kling
58c4d41c5f
Kernel: Remove Limits.h
2019-04-03 13:18:42 +02:00
Andreas Kling
ab43658c55
Kernel: Move devices into Kernel/Devices/.
2019-04-03 12:36:40 +02:00
Andreas Kling
9fca94269e
Kernel: Move TTY-related files into Kernel/TTY/.
2019-04-03 12:28:45 +02:00
Andreas Kling
f9864940eb
Kernel: Move FS-related files into Kernel/FileSystem/
2019-04-03 12:25:24 +02:00