@@ -113,31 +113,31 @@ may not. All metadatas can be now observed in two different spaces (views):
113
113
114
114
::
115
115
116
- |-> aligned with 8B
117
- |-> followed closely
118
- + meta_blkaddr blocks |-> another slot
119
- _____________________________________________________________________
120
- | ... | inode | xattrs | extents | data inline | ... | inode ...
121
- |________|_______|(optional)|(optional)|__(optional)_|_____|__________
122
- |-> aligned with the inode slot size
123
- . .
124
- . .
125
- . .
126
- . .
127
- . .
128
- . .
129
- .____________________________________________________|-> aligned with 4B
130
- | xattr_ibody_header | shared xattrs | inline xattrs |
131
- |____________________|_______________|_______________ |
132
- |-> 12 bytes <- |->x * 4 bytes<-| .
133
- . . .
134
- . . .
135
- . . .
136
- ._______________________________.______________________.
137
- | id | id | id | id | ... | id | ent | ... | ent| ... |
138
- |____|____|____|____|______|____|_____|_____|____|_____ |
139
- |-> aligned with 4B
140
- |-> aligned with 4B
116
+ |-> aligned with 8B
117
+ |-> followed closely
118
+ + meta_blkaddr blocks |-> another slot
119
+ _____________________________________________________________________
120
+ | ... | inode | xattrs | extents | data inline | ... | inode ...
121
+ |________|_______|(optional)|(optional)|__(optional)_|_____|__________
122
+ |-> aligned with the inode slot size
123
+ . .
124
+ . .
125
+ . .
126
+ . .
127
+ . .
128
+ . .
129
+ .____________________________________________________|-> aligned with 4B
130
+ | xattr_ibody_header | shared xattrs | inline xattrs |
131
+ |____________________|_______________|_______________|
132
+ |-> 12 bytes <-|->x * 4 bytes<-| .
133
+ . . .
134
+ . . .
135
+ . . .
136
+ ._______________________________.______________________.
137
+ | id | id | id | id | ... | id | ent | ... | ent| ... |
138
+ |____|____|____|____|______|____|_____|_____|____|_____|
139
+ |-> aligned with 4B
140
+ |-> aligned with 4B
141
141
142
142
Inode could be 32 or 64 bytes, which can be distinguished from a common
143
143
field which all inode versions have -- i_format::
@@ -175,13 +175,13 @@ may not. All metadatas can be now observed in two different spaces (views):
175
175
Each share xattr can also be directly found by the following formula:
176
176
xattr offset = xattr_blkaddr * block_size + 4 * xattr_id
177
177
178
- ::
178
+ ::
179
179
180
- |-> aligned by 4 bytes
181
- + xattr_blkaddr blocks |-> aligned with 4 bytes
182
- _________________________________________________________________________
183
- | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ...
184
- |________|_____________|_____________|_____|______________|_______________
180
+ |-> aligned by 4 bytes
181
+ + xattr_blkaddr blocks |-> aligned with 4 bytes
182
+ _________________________________________________________________________
183
+ | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ...
184
+ |________|_____________|_____________|_____|______________|_______________
185
185
186
186
Directories
187
187
-----------
@@ -193,19 +193,18 @@ algorithm (could refer to the related source code).
193
193
194
194
::
195
195
196
- ___________________________
197
- / |
198
- / ______________|________________
199
- / / | nameoff1 | nameoffN-1
200
- ____________.______________._______________v________________v__________
201
- | dirent | dirent | ... | dirent | filename | filename | ... | filename |
202
- |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____|
203
- \ ^
204
- \ | * could have
205
- \ | trailing '\0'
206
- \________________________| nameoff0
207
-
208
- Directory block
196
+ ___________________________
197
+ / |
198
+ / ______________|________________
199
+ / / | nameoff1 | nameoffN-1
200
+ ____________.______________._______________v________________v__________
201
+ | dirent | dirent | ... | dirent | filename | filename | ... | filename |
202
+ |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____|
203
+ \ ^
204
+ \ | * could have
205
+ \ | trailing '\0'
206
+ \________________________| nameoff0
207
+ Directory block
209
208
210
209
Note that apart from the offset of the first filename, nameoff0 also indicates
211
210
the total number of directory entries in this block since it is no need to
@@ -216,22 +215,22 @@ Compression
216
215
Currently, EROFS supports 4KB fixed-sized output transparent file compression,
217
216
as illustrated below::
218
217
219
- |---- Variant-Length Extent ----|-------- VLE --------|----- VLE -----
220
- clusterofs clusterofs clusterofs
221
- | | | logical data
222
- _________v_______________________________v_____________________v_______________
223
- ... | . | | . | | . | ...
224
- ____|____.________|_____________ |________.____|_____________ |__.__________|____
225
- |-> cluster <- |-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-|
226
- size size size size size
227
- . . . .
228
- . . . .
229
- . . . .
230
- _______._____________._____________._____________._____________________
231
- ... | | | | ... physical data
232
- _______|_____________|_____________|_____________|_____________________
233
- |-> cluster <-|-> cluster <-|-> cluster <-|
234
- size size size
218
+ |<- variable-sized extent ->|<- VLE ->|
219
+ clusterofs clusterofs clusterofs
220
+ | | |
221
+ _________v_________________________________v_______________________v________
222
+ ... | . | | . | | . ...
223
+ ____|____._________|______________ |________.___ _|______________ |__.________
224
+ |-> lcluster <-|-> lcluster <-|-> lcluster <-|-> lcluster <-|
225
+ size size size size . .
226
+ . . . .
227
+ . . . .
228
+ . . . .
229
+ _______.______________.______________.______________._________________
230
+ ... | | | | ...
231
+ _______|______________|______________|______________|_________________
232
+ |-> pcluster <-|-> pcluster <-|-> pcluster <-|
233
+ size size size
235
234
236
235
Currently each on-disk physical cluster can contain 4KB (un)compressed data
237
236
at most. For each logical cluster, there is a corresponding on-disk index to
0 commit comments