@@ -113,31 +113,31 @@ may not. All metadatas can be now observed in two different spaces (views):
113113
114114 ::
115115
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
141141
142142 Inode could be 32 or 64 bytes, which can be distinguished from a common
143143 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):
175175 Each share xattr can also be directly found by the following formula:
176176 xattr offset = xattr_blkaddr * block_size + 4 * xattr_id
177177
178- ::
178+ ::
179179
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+ |________|_____________|_____________|_____|______________|_______________
185185
186186Directories
187187-----------
@@ -193,19 +193,18 @@ algorithm (could refer to the related source code).
193193
194194::
195195
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
209208
210209Note that apart from the offset of the first filename, nameoff0 also indicates
211210the total number of directory entries in this block since it is no need to
@@ -216,22 +215,22 @@ Compression
216215Currently, EROFS supports 4KB fixed-sized output transparent file compression,
217216as illustrated below::
218217
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
235234
236235Currently each on-disk physical cluster can contain 4KB (un)compressed data
237236at most. For each logical cluster, there is a corresponding on-disk index to
0 commit comments