You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -84,11 +84,20 @@ At present, simplefs only provides straightforward features.
84
84
Each block is 4 KiB large.
85
85
86
86
### Superblock
87
-
The superblock is the first block of the partition (block 0). It contains the partition's metadata, such as the number of blocks, number of inodes, number of free inodes/blocks, ...
87
+
The superblock, located at the first block of the partition (block 0), stores
88
+
the partition's metadata. This includes the total number of blocks, the total
89
+
number of inodes, and the counts of free inodes and blocks.
88
90
89
91
### Inode store
90
-
Contains all the inodes of the partition. The maximum number of inodes is equal to the number of blocks of the partition. Each inode contains 72 B of data: standard data such as file size and number of used blocks, as well as a simplefs-specific field `ei_block`. This block contains:
91
-
- for a directory: the list of files in this directory. A directory can contain at most 40920 files, and filenames are limited to 255 characters to fit in a single block.
92
+
This section contains all the inodes of the partition, with the maximum number
93
+
of inodes being equal to the number of blocks in the partition. Each inode
94
+
occupies 72 bytes of data, encompassing standard information such as the file
95
+
size and the number of blocks used, in addition to a simplefs-specific field
96
+
named `ei_block`. This field, `ei_block`, serves different purposes depending
97
+
on the type of file:
98
+
- For a directory, it contains the list of files within that directory.
99
+
A directory can hold a maximum of 40,920 files, with filenames restricted
100
+
to a maximum of 255 characters to ensure they fit within a single block.
92
101
```
93
102
inode
94
103
+-----------------------+
@@ -110,7 +119,10 @@ Contains all the inodes of the partition. The maximum number of inodes is equal
110
119
+----------------+
111
120
112
121
```
113
-
- for a file: the list of extents containing the actual data of this file. Since block IDs are stored as `sizeof(struct simplefs_extent)` bytes values, at most 341 links fit in a single block, limiting the size of a file to around 10.65 MiB (10912 KiB).
122
+
- For a file, it lists the extents that hold the actual data of the file.
123
+
Given that block IDs are stored as values of `sizeof(struct simplefs_extent)`
124
+
bytes, a single block can accommodate up to 341 links. This limitation
125
+
restricts the maximum size of a file to approximately 10.65 MiB (10,912 KiB).
114
126
```
115
127
inode
116
128
+-----------------------+
@@ -137,10 +149,13 @@ Contains all the inodes of the partition. The maximum number of inodes is equal
137
149
```
138
150
139
151
### Extent support
140
-
The extent covers consecutive blocks, we allocate consecutive disk blocks for it at a single time. It is described by `struct simplefs_extent` which contains three members:
141
-
-`ee_block`: first logical block extent covers.
142
-
-`ee_len`: number of blocks covered by extent.
143
-
-`ee_start`: first physical block extent covers.
152
+
An extent spans consecutive blocks; therefore, we allocate consecutive disk blocks
153
+
for it in a single operation. It is defined by `struct simplefs_extent`, which
154
+
comprises three members:
155
+
-`ee_block`: the first logical block that the extent covers.
156
+
-`ee_len`: the number of blocks the extent covers.
157
+
-`ee_start`: the first physical block that the extent covers."
158
+
144
159
```
145
160
struct simplefs_extent
146
161
+----------------+
@@ -155,7 +170,6 @@ struct simplefs_extent
155
170
+---------+
156
171
211 | |
157
172
+---------+
158
-
159
173
```
160
174
161
175
## TODO
@@ -164,5 +178,5 @@ struct simplefs_extent
164
178
165
179
## License
166
180
167
-
`simplefs` is released under the BSD 2 clause license. Use of this source code is governed by
168
-
a BSD-style license that can be found in the LICENSE file.
181
+
`simplefs` is released under the BSD 2 clause license. Use of this source code
182
+
is governed by a BSD-style license that can be found in the LICENSE file.
0 commit comments