<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pub/teachos/kernel.git/kernel, branch fmorgner/vfs-mount-initialization</title>
<subtitle>An educational OS kernel</subtitle>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/'/>
<entry>
<title>fixup! kernel/fs: ext2: fix block allocation on 1 KiB fs</title>
<updated>2026-08-28T18:35:42+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T18:35:42+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=a24af4a33c403e9aafd079e0a91a6e184fc85c46'/>
<id>a24af4a33c403e9aafd079e0a91a6e184fc85c46</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup! kernel/vfs: add identity based mount removal</title>
<updated>2026-08-28T18:27:44+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T18:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=5613771ef93a462795fa3bec0aaa436c59a9a331'/>
<id>5613771ef93a462795fa3bec0aaa436c59a9a331</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/vfs: implement root swivel and mount move</title>
<updated>2026-08-28T18:21:37+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T18:21:37+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=4eab5620f49a8ef31d0c620671718c5307276ec6'/>
<id>4eab5620f49a8ef31d0c620671718c5307276ec6</id>
<content type='text'>
Previously, the device filesystem (devfs) was simply grafted on each
root filesystem during boot. This caused the existence of an
unreachable, dead devfs mount after the VFS instance had been
initialized.

This changeset implements the ability to relocate an active mount from
one mount point to another. That way, no second devfs mount needs to be
created. Instead, the existing devfs mount is relocated to a mount point
in the persistent root filesystem that get mounted during
initialization.

Secondly, this changeset also alters the VFS initialization flow, so
that only one root mount exists after initialization finishes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the device filesystem (devfs) was simply grafted on each
root filesystem during boot. This caused the existence of an
unreachable, dead devfs mount after the VFS instance had been
initialized.

This changeset implements the ability to relocate an active mount from
one mount point to another. That way, no second devfs mount needs to be
created. Instead, the existing devfs mount is relocated to a mount point
in the persistent root filesystem that get mounted during
initialization.

Secondly, this changeset also alters the VFS initialization flow, so
that only one root mount exists after initialization finishes.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup! kernel/vfs: mount: resolve return type todo</title>
<updated>2026-08-28T18:21:18+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T18:21:18+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=92e04cd721b497a6483a121f58ac15aa53325910'/>
<id>92e04cd721b497a6483a121f58ac15aa53325910</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/fs: ext2: fix block allocation on 1 KiB fs</title>
<updated>2026-08-28T18:05:24+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T18:05:24+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=662f5870a878ed29821fd82751629a8a0dd9041f'/>
<id>662f5870a878ed29821fd82751629a8a0dd9041f</id>
<content type='text'>
When computing the actual block numbers for a filesystem, care must be
taken to account for which block is the actual first data block. For
1 KiB block size filesystems, that block is actually block 1, not 0.
This is because the first 1 KiB on any ext2 volume is reserved for
bootloader data.

Complicating matters, the bitmaps don't take this into account. They
essentially reflect a logical view, describing which data blocks are
already allocated. On a 1 KiB filesystem, this effectively means that
bit 0 of the allocation bitmap references physical block 1.

Luckily, we don't need to make that determination based on the block
size at all. The superblock already carries the number of the first data
block. That means one can simply add that number, which is 1 in the
1 KiB block size case and 0 otherwise, to the found block index.

Interestingly, this was already caught by accident when locating the
authoritative block group descriptor (BGD) table. A factor of two was
multiplied into the calculation in the case of a 1 KiB block size. This
factor arises because the primary BGD table follows the primary
superblock. Since the superblock is located in physical block 0 in all
cases except for a 1 KiB block size, the BGD table generally lands in
block 1. This implies an offset of 1 block size from the volume start.
In the 1 KiB case, the BGD table lands in block number 2, effectively at
an offset of 2 blocks from the start of the volume.

This changeset makes that calculation explicit in the BGD table locator
code as well. This clarifies the previously obscure factor of 2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When computing the actual block numbers for a filesystem, care must be
taken to account for which block is the actual first data block. For
1 KiB block size filesystems, that block is actually block 1, not 0.
This is because the first 1 KiB on any ext2 volume is reserved for
bootloader data.

Complicating matters, the bitmaps don't take this into account. They
essentially reflect a logical view, describing which data blocks are
already allocated. On a 1 KiB filesystem, this effectively means that
bit 0 of the allocation bitmap references physical block 1.

Luckily, we don't need to make that determination based on the block
size at all. The superblock already carries the number of the first data
block. That means one can simply add that number, which is 1 in the
1 KiB block size case and 0 otherwise, to the found block index.

Interestingly, this was already caught by accident when locating the
authoritative block group descriptor (BGD) table. A factor of two was
multiplied into the calculation in the case of a 1 KiB block size. This
factor arises because the primary BGD table follows the primary
superblock. Since the superblock is located in physical block 0 in all
cases except for a 1 KiB block size, the BGD table generally lands in
block 1. This implies an offset of 1 block size from the volume start.
In the 1 KiB case, the BGD table lands in block number 2, effectively at
an offset of 2 blocks from the start of the volume.

This changeset makes that calculation explicit in the BGD table locator
code as well. This clarifies the previously obscure factor of 2.
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/vfs: add identity based mount removal</title>
<updated>2026-08-28T14:40:11+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T14:40:11+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=d3125dee241cd68ace6069537d36d32fc709b945'/>
<id>d3125dee241cd68ace6069537d36d32fc709b945</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/vfs: mount: resolve return type todo</title>
<updated>2026-08-28T14:36:40+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T14:36:40+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=b93a61ce7aca1831a2e81b7bd8d5870d86554f71'/>
<id>b93a61ce7aca1831a2e81b7bd8d5870d86554f71</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/vfs: replace owning_mount with driver_state</title>
<updated>2026-08-28T14:12:29+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-28T14:10:18+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=380388c8c49889338d7803e1d9776320d166874e'/>
<id>380388c8c49889338d7803e1d9776320d166874e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel/fs: devfs: inject . and .. entries</title>
<updated>2026-08-27T16:59:30+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-27T16:41:38+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=62c65eae804f2cedb3e1856aad976c57749b7c19'/>
<id>62c65eae804f2cedb3e1856aad976c57749b7c19</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: add 'ls' style demo</title>
<updated>2026-08-27T16:26:59+00:00</updated>
<author>
<name>Felix Morgner</name>
<email>felix.morgner@ost.ch</email>
</author>
<published>2026-08-27T16:26:59+00:00</published>
<link rel='alternate' type='text/html' href='http://source.arknet.ch/pub/teachos/kernel.git/commit/?id=1e5515f822e22a2ad175a35ef2c0473a40be8d88'/>
<id>1e5515f822e22a2ad175a35ef2c0473a40be8d88</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
