Most people pick a Linux filesystem once, by accepting whatever the installer offers, and never think about it again until something goes wrong. The three main choices behave very differently when it does. To compare them on more than spec sheets, three identical 1 GiB disk images were formatted as ext4, XFS and Btrfs with default settings, mounted on the same Linux machine, and put through the same tests: how much space each leaves free, how each copies a large file, whether each can shrink, and what each does when a single block of a file is quietly corrupted on disk. That last test produced the most important result.
Who uses what
Defaults tell a story
Red Hat’s file systems overview for RHEL 9 calls XFS the default file system in RHEL, and its general advice is to use XFS unless there is a specific reason for ext4. It suggests ext4 may suit smaller systems or environments with limited I/O bandwidth. The same page does not offer Btrfs at all; it says Red Hat deprecated it.
Fedora went the other way. Its Btrfs by default change proposal targeted Fedora 33 for making Btrfs the default on all desktop editions, spins and labs, listing data checksumming, online resizing, shared free space between / and /home, and efficient snapshot replication among the reasons.
ext4 is the long-standing default of many other distributions and the most conservative choice of the three: the oldest design, the most widely tested, and the one every rescue tool understands.

Space on a fresh 1 GiB disk
What df reported right after formatting
| Filesystem | Size shown | Used | Available | Inodes |
|---|---|---|---|---|
| ext4 | 974 MiB | 1 MiB | 907 MiB | 65,536, fixed |
| XFS | 960 MiB | 51 MiB | 910 MiB | 524,288, grows as needed |
| Btrfs | 1,024 MiB | 6 MiB | 905 MiB | not reported |
All three landed within 5 MiB of each other for usable space, but for different reasons.
Where ext4’s space goes
ext4 showed 974 MiB of size but only 907 MiB available, a gap far bigger than its 1 MiB “used.” tune2fs explained it: 13,107 blocks, 5 percent of the filesystem, are reserved for the root user so the system can keep running when a regular user fills the disk. On a 4 TB data drive that reservation is about 200 GB, and tune2fs -m 1 (or -m 0 on a pure storage disk) gives most of it back.
The inode ceiling
ext4 decided at format time that this disk would hold at most 65,536 files. XFS allocates inodes dynamically, and Btrfs does not have a fixed table at all, so df -i reports zero. A disk full of millions of tiny files, such as a mail spool or a build cache, can run ext4 out of inodes while gigabytes still look free. That failure gets its own explanation another time.
Copying a 300 MB file
Reflinks
XFS and Btrfs both support reflinks: a copy that shares the original’s data blocks until one of them is changed. XFS had them switched on by default (xfs_info reported reflink=1). A 300 MB file of random data was copied on each filesystem with cp --reflink=always:
| Filesystem | Reflink copy | Space used afterward | Full copy (--reflink=never) |
|---|---|---|---|
| ext4 | “Operation not supported” | no change | about 490 ms, +300 MiB |
| XFS | about 4 ms | unchanged | about 510 ms, +300 MiB |
| Btrfs | about 4 ms | unchanged | not run |
On XFS and Btrfs, the “copy” took four milliseconds and used no extra space, because nothing was actually copied. On ext4, the same command failed outright. Recent versions of cp try a reflink automatically and fall back to a normal copy, so on XFS and Btrfs, many everyday copies are already instant without anyone asking.
Snapshots
Btrfs goes one step further. btrfs subvolume snapshot froze the entire filesystem, including both files, into a new read-write directory in about 5 ms, using no extra space until files change. Tools like Snapper and Timeshift build automatic system rollbacks on exactly that. XFS and ext4 have no built-in snapshots; they rely on LVM underneath for that.

Growing and shrinking
All three grow
Every one of these filesystems can be enlarged while mounted. Shrinking is where they part ways, and it matters any time a disk has to be repartitioned.
The shrink test
Each filesystem was asked to drop from 1 GiB to about 700 MiB after its test files were deleted:
| Filesystem | Result |
|---|---|
| ext4 | Worked, but only unmounted: e2fsck -f then resize2fs ext4.img 700M |
| Btrfs | Worked while mounted: btrfs filesystem resize 700M |
| XFS | Failed: “[EXPERIMENTAL] try to shrink unused space”, then “No space left on device” |
ext4’s offline requirement is the catch for a root filesystem, which cannot be unmounted while the system runs from it; shrinking one means booting from a USB stick first. Before shrinking, resize2fs -P estimates the smallest size the filesystem could reach. On the test image, emptied of everything except its own metadata, it reported 122,123 blocks, about 477 MiB: inode tables, the journal and other fixed structures, plus the margin the tool leaves itself. On a real disk the estimate is mostly driven by how much data is stored, and running it first avoids a resize that cannot finish.
The XFS result matches Red Hat’s documentation, which says XFS has no utility to reduce a file system’s size. The current tools carry an experimental shrink that only works in narrow cases, and it refused here even with the disk almost empty. An XFS filesystem that is too big stays too big until it is backed up, recreated and restored.
Red Hat’s page also lists the ceilings: up to 1,024 TiB for XFS and 50 TiB for ext4 in RHEL 9. For a home server, both are far beyond what a single filesystem will hold.
One corrupted block
The test
The most revealing experiment simulated silent corruption, the kind a failing drive, a bad cable or a firmware bug can produce without any error. A 1 MiB file made of a recognizable repeating pattern was written to each filesystem. Each filesystem was unmounted, and in its disk image a single 4 KiB block in the middle of the file had its first 16 bytes overwritten with zeros, directly, bypassing the filesystem. Then each was remounted, the cache was dropped, and the file was read back.
| Filesystem | What reading the file did |
|---|---|
| ext4 | Returned the file normally, with 16 zero bytes in the middle and no error |
| XFS | Returned the file normally, with 16 zero bytes in the middle and no error |
| Btrfs | Refused: “Input/output error” |
The kernel log on the Btrfs system named the problem precisely:
BTRFS warning (device loop3): csum failed root 5 ino 259 off 524288
csum 0xb7215939 expected csum 0x818c0458 mirror 1
A btrfs scrub afterward reported one uncorrectable checksum error, pointing straight at the damaged file.
What the result means
The Btrfs documentation on checksumming says data and metadata are both checksummed by default, crc32c unless chosen otherwise, with each data block’s checksum stored separately and verified after reading. ext4 and XFS protect their own metadata, but not file contents. They handed back damaged data as if it were fine, and a backup taken afterward would have copied the damage faithfully.
Btrfs could not repair the block, because a single disk holds only one copy of the data. On a two-disk Btrfs RAID1, the same check would let it read the good copy from the other drive. Detection alone is still worth a great deal: an error is a prompt to restore from backup, while silent corruption gets backed up over the good copy.

Which one to pick
Plain rules from the results
- ext4 for a simple system disk or a small VM, where predictability and universal tool support matter most. Lower the 5 percent reservation on big data disks.
- XFS for large disks with big files, such as video storage or databases, on systems that will only ever grow. Do not choose it for anything that may need shrinking later.
- Btrfs where snapshots, instant copies or data checksums are worth having: desktops that want rollbacks, home servers that care about bit rot, and backup targets. Its own status page rates single, DUP and RAID1 profiles as OK but marks RAID5 and RAID6 as unstable and not for anything beyond testing.
What no filesystem replaces
Btrfs noticed the damage. It did not fix it, and none of the three would have survived the drive itself dying. A checksum tells the truth about a file. Only a backup on a second device brings the file back.
Sources
- Overview of available file systems, RHEL 9 Managing file systems, Red Hat: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_file_systems/overview-of-available-file-systems_managing-file-systems
- Changes/BtrfsByDefault, Fedora Project Wiki: https://fedoraproject.org/wiki/Changes/BtrfsByDefault
- Checksumming, Btrfs documentation: https://btrfs.readthedocs.io/en/latest/Checksumming.html
- Status, Btrfs documentation: https://btrfs.readthedocs.io/en/latest/Status.html
