Getting lwext4 to actually write changes to the disk is turning out to be a bit involved
Notices by Drew DeVault (drewdevault@fosstodon.org), page 5
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:52 JST Drew DeVault -
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:52 JST Drew DeVault Day 12 of making a Unix clone
New syscalls: getdents, fexecve
Fleshed out the filesystem implementation via os:: in the Bunnix port of the Hare stdlib
Some more inode refactoring done
(f)execve(2) now populates auxilary vector of new process
Next: stat/fstat/fstatat, respect/enforce open flags and file modes (e.g. O_WRONLY on a file with -w should not work, implement O_DIRECTORY, etc)
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Block device files are now mounted, not that you can open them
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Call it 32 lines, that assert belongs somewhere else
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Will probably have to change a bit once I implement signals and have to deal with EINTR
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault To implement nanosleep I just improved the wait queues a bit until nanosleep could be done in 33 lines of code
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Character special device files baby!
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Answer: turns out it was a bug in the AHCI driver. Took me ages to figure that out.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:51 JST Drew DeVault Spent most of the day failing to get O_CREAT to work on ext4, further investigation tomorrow
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault many process, much wait
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault waitpid
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault The cache currently serves just to make sure that there is a 1:1 correspondence between inode numbers and inode data structures (so that if several files hold a reference to the same inode they all remain in sync), it does not persist inodes after all references are released... yet. A broader cache system that keeps cached data in unused RAM is planned for the future.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault Also implemented an inode cache and reference counting for inodes 😃
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault Implemented a bunch of openat flags this morning: RDONLY/WRONLY/RDWR is now enforced, and O_DIRECTORY, O_APPEND, O_TRUNC, and O_EXCL are now supported
I chose to diverge from POSIX on O_DIRECTORY because I think it's kind of lame, but I could change my mind if this comes back to bite me when I start porting real-world software
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault Ended up with some extra free time tonight and did a couple more syscalls: unlinkat, mkdirat
Remaining filesystem-related syscalls are the stat family of calls, rmdirat (or AT_REMOVEDIR I guess), chmod/chown/chgrp, readlinkat, linkat, symlinkat, and utimensat.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:50 JST Drew DeVault Today's mood
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:49 JST Drew DeVault I need to implement an idle task so that the kernel doesn't crash when all processes are blocked, but I don't want to touch the scheduler again
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:48 JST Drew DeVault Day 19 -- going to Utrecht tonight so there's not going to be much
* dash incorporated into source tree to provide /bin/sh
* New syscalls: setcreds (provides setuid et al), setgroups, mount
* libc expanded with support for passwd, groups, shadow, etc, login(1) stuff
* Bunnix executes /etc/rc on boot as a shell scriptI have realized that dash depends on signals to work properly, however, so I will probably have to either get that working or switch to rc.
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:48 JST Drew DeVault ✓ idle
Hopefully I don't have to touch the scheduler again until SMP
Next up... block special devices. I really need to do signal but blockdevs will let me procrastinate on that
Could do sleep(2) as well
-
Drew DeVault (drewdevault@fosstodon.org)'s status on Tuesday, 21-May-2024 20:35:47 JST Drew DeVault Today:
/dev/cons
/dev/kbd