Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

YAFFS is a log-structured filesystem, just like F2FS. Log-structuring gives you a data organization protocol. This protocol gives you an implicit crash-recovery story, there is no need for additional journaling on top of it.

Journalling is used when some blocks on the disk are scheduled to be overwritten. Instead, the blocks are written in a separate location (the so-called journal). At a later point in time, the data blocks get overwritten. Once the data is safely on the disk (via Forced Unit Access (FUA) or a flush track cache-type operation) we can then truncate the journal.

Log-structured systems do not do this. Instead, the achieve crash safety via never overwriting data; they always write elsewhere (into something called 'the log'). Eventually, too much of this log is filled with garbage, stale data. This is when 'cleaning' occurs. However, cleaning is expensive and slow. You must read a large amount of data, figure out what is alive/dead, and then write it all out.

F2FS's contribution to FS design seems to be handling this cleaning operation in a more graceful manner.



Possibly the most succinct explanation of log-structured vs journaling filesystems I have ever read.

Thankyou.


How large percentage of the storage space can you use before you enter garbage collection hell?


Thanks, that's an awesome summary, and good to know. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: