File structures.
[cascardo/kernel/old_slides/.git] / 02.vfs / 02.vfs.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE slides SYSTEM "/usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides-full.dtd">
3
4 <slides>
5
6 <slidesinfo>
7 <title>Virtual File System</title>
8 <author><firstname>Thadeu</firstname><surname>Cascardo</surname></author>
9 </slidesinfo>
10
11 <foil>
12 <title>Introduction</title>
13 <para>
14 The virtual file system is the hub for almost all operations in a Linux-based
15 system. It allows IPC with pipes, access to devices, including storage through
16 regular files and organization with directories.
17 </para>
18 </foil>
19
20 <foil>
21 <title>Everything is a file</title>
22 <para>
23 In Unix, there's a say: "everything is a file, if it's not a file, it's a
24 process". Well, most things are really files, and that's why the VFS is at the
25 center of the system, including for device drivers.
26 </para>
27 </foil>
28
29 <foil>
30 <title>Special files, procfs and others</title>
31 <para>
32 When handling with special files (character and block device nodes), procfs
33 files and others, we'll use some common structures. These include the
34 <emphasis>struct file\_operations</emphasis>, <emphasis>struct file</emphasis>
35 and <emphasis>struct inode</emphasis>.
36 </para>
37 </foil>
38
39 <foil>
40 <title>File Operations</title>
41 <itemizedlist>
42 <listitem>
43 open
44 </listitem>
45 <listitem>
46 release
47 </listitem>
48 <listitem>
49 read
50 </listitem>
51 <listitem>
52 write
53 </listitem>
54 <listitem>
55 ioctl
56 </listitem>
57 <listitem>
58 llseek
59 </listitem>
60 <listitem>
61 poll
62 </listitem>
63 <listitem>
64 mmap
65 </listitem>
66 <listitem>
67 many others
68 </listitem>
69 </itemizedlist>
70 </foil>
71
72 <foil>
73 <title>Opened File</title>
74 <itemizedlist>
75 <listitem>
76 f\_mode
77 </listitem>
78 <listitem>
79 f\_flags
80 </listitem>
81 <listitem>
82 f\_pos
83 </listitem>
84 <listitem>
85 f\_op
86 </listitem>
87 <listitem>
88 private\_data
89 </listitem>
90 </itemizedlist>
91 </foil>
92
93 <foil>
94 <title>Filesystem File: inode</title>
95 <para>
96 The inode is a representation of the file as in its filesystem, including its
97 major/minor numbers and pointers to the corresponding device representation.
98 </para>
99 </foil>
100
101 </slides>