aboutsummaryrefslogtreecommitdiff
path: root/docs/kernel/filesystem/device_inode.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/kernel/filesystem/device_inode.rst')
-rw-r--r--docs/kernel/filesystem/device_inode.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/kernel/filesystem/device_inode.rst b/docs/kernel/filesystem/device_inode.rst
new file mode 100644
index 00000000..cf5e72fa
--- /dev/null
+++ b/docs/kernel/filesystem/device_inode.rst
@@ -0,0 +1,19 @@
+Device Inodes
+=============
+
+Device inodes are filesystem inodes that represent a device in the system.
+They may be created from either a device, or by reconstituting a persistent device inode from a filesystem.
+
+An example for device inodes created to directly represent devices are the entries in the devfs (/dev) filesystem.
+Entries in this filesystem are generally created and removed based on devices appearing in and being removed from the system.
+
+An example for device inodes reconstituted from persisted inodes can be found in the inodes supported by the ext2 filesystem.
+In that filesystem, an inode may represent a device, using a device identification number.
+When accessing such an inode, a device inode needs to be reconstituted from the persisted device inode in order to resolve which device, if any, it refers to.
+However, any file operations (e.g. `stat`) need to be forwarded to the persisted inode.
+
+API Reference
+-------------
+
+.. doxygenstruct:: kernel::filesystem::device_inode
+ :members: \ No newline at end of file