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
Add nr_blk in struct simiplefs_file to record the number of contiguous
blocks a file occupies, similar to ext4's rec_len. This speeds up
finding free blocks and optimizes file removal by merging freed space
with the previous entry.
Each transaction starts with a descriptor block, followed by several metadata blocks or data blocks, and ends with a commit block. Every modified metadata (such as inode, bitmap, etc.) occupies its own block. Currently, simplefs primarily records "extent" metadata.
194
199
195
200
196
-
How to Enable Journaling in simplefs:
201
+
How to Enable Journaling in simplefs:
197
202
198
203
Step 1: Create the Journal Disk Image
199
204
To create an 8MB disk image for the journal, use the following make command:
200
205
201
-
Note:
206
+
Note:
202
207
Assuming an 8 MB size for the external journal device, which is an arbitrary choice for now, I will set the journal block length to a fixed 2048, calculated by dividing the device size by the block size (4096 bytes).
0 commit comments