Save this video free

ECE344 Fall 2026 (Sec 1) Lec 25 - Advanced Filesystems

Jon Eyolfson · 52:28 · Watch on YouTube

Part of University of Toronto ECE 344. See all 22 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Unix file-system updates can modify several blocks, so a crash may leave data, inodes, and allocation bitmaps inconsistent; fsck can repair metadata but must scan the whole file system, while fsync forces selected changes to storage. Journaling makes metadata updates recoverable through logged transactions, and copy-on-write systems such as Btrfs and ZFS avoid in-place updates, enabling fast snapshots and checksummed storage while introducing tradeoffs such as fragmentation.

Key takeaways

Chapters

0:00 Unix File Deletion and the Multi-Block Crash Problem
4:30 Ext4 Block Appends, Failure Cases, and fsck
11:00 Building and Breaking an ext4 Image with debugfs
17:18 Page Cache, fsync, and PostgreSQL's fsyncgate
22:53 Journal Transactions, Commit Records, and Crash Recovery
33:43 ext4 Journal Modes and Atomic File Replacement
37:14 Copy-on-Write Trees and Crash-Safe Root Switching
42:26 Btrfs Snapshots, Subvolumes, and Reflink Copies
45:37 Checksums, RAID, Scrubbing, and Copy-on-Write Costs
50:28 Log-Structured File Systems and SSD-Friendly F2FS

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

1:44 All right. So crashing. Woo. So crash can leave your file system inconsistent. To actually delete a file, now you can imagine there's a lot of steps knowing that, you know, there's a directory has a name to an inode, then the inode points to data blocks. There's a whole lot of stuff going on. So, deleting a file on a Unix file system actually takes three steps. So, I have to remove its directory entry, which means I'm changing the contents of the directory. I'm removing, you know, that name inode pair. Then there's also, whoops, an also a pool of inodes on your disk. So, they're allocated in giant pool. So, I have to say, hey, I'm not using that inode anymore. I have no more references

2:32 to it. So, there's a pool of free inodes. And then there's also something keeping track of the pool of free blocks. So, I'm not using that data anymore. Whatever data it was using, I can actually mark them unused now. So, I have to mark them actually unused somewhere. And then it knows that I can use those blocks for data for other files. So, three-step process that gets changed in, well, up to three different disk blocks, right? And a crash can happen between any of these or you could someone could pull the power out or the hard drive could die, although you probably have a bigger problem at that point. So, we'd get in weird because a crash between any two of them leaks some storage.

3:20 There is something called a journal that records operations in progress, like groups these all together because it's one logical operation. And that's how we can recover from a crash, which you'll see in the next lecture, which is immediately now. So,

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jon Eyolfson.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.