один интерфейс VFS, пять разных ответов на вопрос «как хранить байты на диске»one VFS interface, five different answers to "how do you store bytes on disk"

Файловые системыFilesystems

Ядро не привязано к одной файловой системе — оно определяет общий интерфейс (VFS) и позволяет подключить любую реализацию под ним. ext4, Btrfs, XFS, ZFS и F2FS решают одну и ту же задачу (хранение и поиск файлов на блочном устройстве) совершенно разными структурами данных и с разными компромиссами: журналирование vs copy-on-write, простота vs снапшоты и чексуммы, совместимость лицензии с GPL. Каждой посвящена отдельная статья со схемами структур на диске и алгоритмов работы.The kernel isn't tied to one filesystem — it defines a common interface (VFS) and lets any implementation plug in underneath it. ext4, Btrfs, XFS, ZFS, and F2FS all solve the same problem (storing and finding files on a block device) with completely different on-disk data structures and trade-offs: journaling vs copy-on-write, simplicity vs snapshots and checksums, GPL license compatibility. Each gets its own article with diagrams of on-disk structures and working algorithms.

Общий механизмThe shared mechanism

то, что используют все файловые системы нижеwhat every filesystem below builds on

Файловые системыFilesystems

ext4журналируемая ФС по умолчанию для большинства дистрибутивов: block group, inode-таблицы, extent-деревья вместо блочных указателей ext2/3, journal (JBD2) и почему после падения питания не нужен полный fsck.the journaling default for most distros: block groups, inode tables, extent trees instead of ext2/3's block pointers, the journal (JBD2), and why a power loss doesn't require a full fsck.detailed Btrfscopy-on-write вместо журнала: как CoW распространяется по дереву от листа до корня, chunk tree для RAID на уровне ФС, снапшоты и cp --reflink как побочный эффект той же механики, сквозные чексуммы и scrub — и почему RAID5/6 годами имеет статус «не для прода».copy-on-write instead of a journal: how CoW propagates up the tree from leaf to root, the chunk tree for filesystem-level RAID, snapshots and cp --reflink as a side effect of the same mechanics, end-to-end checksums and scrub — and why RAID5/6 has carried a "not for production" status for years.detailed XFSallocation groups как встроенный шардинг для параллельного I/O; два B+-дерева свободного места (by-block/by-size), bmbt для данных файла, rmap для reflink и online repair без размонтирования (xfs_scrub), delayed logging/CIL — и почему уменьшить том на лету до сих пор нельзя.allocation groups as filesystem-level sharding for parallel I/O; two free-space B+-trees (by-block/by-size), the bmbt for file data, rmap for reflink and online repair without unmounting (xfs_scrub), delayed logging/CIL — and why shrinking a volume online still isn't possible.detailed ZFSФС и volume manager слиты в один слой: pool/vdev/dataset/zvol, merkle-дерево чексумм с self-healing, RAID-Z без write hole, ARC/L2ARC/ZIL, снапшоты/clone/send-receive, дедупликация — и почему CDDL держит её вне мейнлайн-ядра даже в 2026.the filesystem and volume manager fused into one layer: pool/vdev/dataset/zvol, a merkle-tree of checksums with self-healing, RAID-Z with no write hole, ARC/L2ARC/ZIL, snapshots/clone/send-receive, deduplication — and why the CDDL keeps it out of the mainline kernel even in 2026.detailed F2FSsegment/section/zone под геометрию NAND flash, NAT решает wandering tree проблему ранних log-structured ФС, hot/cold data separation и multi-head logging для эффективной сборки мусора, checkpoint вместо журнала — основная ФС Android и частый выбор для embedded.segment/section/zone matching NAND flash geometry, the NAT solving early log-structured filesystems' wandering tree problem, hot/cold data separation and multi-head logging for efficient garbage collection, a checkpoint instead of a journal — Android's primary filesystem and a common embedded choice.detailed

статусstatus

Все 6 карточек написаны подробно со схемами структур и алгоритмов: VFS, ext4, Btrfs, XFS, ZFS, F2FS.All 6 cards are written up in detail with diagrams of structures and algorithms: VFS, ext4, Btrfs, XFS, ZFS, F2FS.