Imported more from last LDD course.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 16 May 2010 18:56:51 +0000 (15:56 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sun, 16 May 2010 18:56:51 +0000 (15:56 -0300)
04char/chrdev

index 5b6f7e9..e66490f 100644 (file)
@@ -39,3 +39,51 @@ calls to do that for character devices are:
 * int alloc\\_chrdev\\_region (dev\\_t *dev, unsigned int firstminor,
 unsigned int count, char *name);
 * void unregister\\_chrdev\\_region (dev\\_t dev, unsigned int count);
+
+
+
+
+# VFS
+
+# Introduction
+
+The virtual file system is the hub for almost all operations in a Linux-based
+system. It allows IPC with pipes, access to devices, including storage through
+regular files and organization with directories.
+
+# Everything is a file
+
+In Unix, there's a say: "everything is a file, if it's not a file, it's a
+process". Well, most things are really files, and that's why the VFS is at the
+center of the system, including for device drivers.
+
+# Special files, procfs and others
+
+When handling with special files (character and block device nodes), procfs
+files and others, we'll use some common structures. These include the
+*struct file\\_operations*, *struct file* and *struct inode*.
+
+# File Operations
+
+* open
+* release
+* read
+* write
+* ioctl
+* llseek
+* poll
+* mmap
+* many others
+
+# Opened File
+
+* f\\_mode
+* f\\_flags
+* f\\_pos
+* f\\_op
+* private\\_data
+
+# Filesystem File: inode
+
+The inode is a representation of the file as in its filesystem, including its
+major/minor numbers and pointers to the corresponding device representation.