Beyond daily operations, ext4 and XFS have advanced features rarely discussed. This episode covers tune2fs tuning for reserved blocks and hashes, inline data and 64-bit metadata checksums on ext4, then reflink cp --reflink and dax persistent memory on XFS.

After mastering the daily operations of ext4 and XFS in episodes 3 and 4, it's time to go deeper. Episode 12 covers advanced features that most admins rarely use but that can be very valuable in the right situations: reserved block tuning, inline data, 64-bit metadata checksums on ext4, and reflink plus persistent memory (dax) on XFS.
These features aren't for everyday use — some are even experimental. But understanding them shows you the limits of each filesystem, and when to look for another solution.
Most experiments in this episode require a freshly created filesystem or one that's been taken offline. Use a loopback disk to stay safe.
Reserved blocks start at 5 percent — kept to reduce fragmentation and give root room when the disk is full. On large disks, 5 percent can become hundreds of gigabytes of unused space:
sudo tune2fs -m 1 /dev/loop0
sudo tune2fs -r 10000 /dev/loop0-m 1 sets 1 percent; -r 10000 sets an absolute block count. On a filesystem for data (not root), 1 percent is almost always enough.
Directory hashes on ext4 use tea, half_md4, or siphash. SipHash is more resistant to hash collision attacks:
sudo tune2fs -E hash_seed=<hex> -O dir_index /dev/loop0A random hash seed makes directory hash tables unpredictable — protection against collision-based denial-of-service attacks.
Inline data stores very small files directly inside the inode, with no data block at all. For filesystems with millions of tiny files (for example cache directories), this reduces I/O and fragmentation:
sudo mkfs.ext4 -O inline_data /dev/loop0Enable it at filesystem creation — this feature can't be added later. The inline size is limited by the inode size (usually 256 bytes, some of which is used by metadata).
Modern ext4 supports metadata checksums and 64-bit for filesystems larger than 16 TB:
sudo tune2fs -O metadata_csum,64bit /dev/loop0Metadata checksums detect structure corruption (not data), and 64bit extends the block range. Both are already defaults on new filesystems; for old ones, enable them while unmounted and verify with e2fsck:
sudo e2fsck -f -y /dev/loop0
sudo dumpe2fs -h /dev/loop0 | grep -i checksummetadata_csum,64bit makes modern ext4 ready for multi-terabyte disks with better structural integrity.
Reflink makes two files share the same physical blocks until one of them is modified (Copy-on-Write at the file level). This is an instant way to duplicate large files:
sudo cp --reflink=always /mnt/lab/iso-besar.iso /mnt/lab/salinan.iso
ls -lh /mnt/labWith --reflink=always, no data is copied — only pointers. ls -lh still shows the full size for both, but the real block usage is only one copy. Check with du:
sudo du -h /mnt/lab/iso-besar.iso /mnt/lab/salinan.isoReflink works thanks to the reflink feature enabled at mkfs.xfs -m reflink=1 (default on modern kernels). This pattern is very useful for snapshot-level copies in applications like file servers or backup tools.
Because reflink shares blocks, deleting one of the files doesn't immediately free space — the blocks are still used by its sibling. When both are modified, each gets separate new blocks allocated (breaking the link). Understand this behavior so you're not surprised by space usage reports.
DAX (Direct Access) allows direct access to persistent memory (PMEM, for example Intel Optane or NVDIMM) without going through the page cache:
sudo mkfs.xfs -d su=2m,sw=1 /dev/pmem0
sudo mount -o dax /dev/pmem0 /mnt/pmemThe dax mode gives direct memory access to the device — much lower latency for workloads that map files into memory. DAX status can be checked with xfs_info or mount | grep dax.
Warning
DAX is still considered experimental for most production workloads. Verify your hardware and kernel support, and test with benchmarks before relying on it.
Every advanced feature has a cost:
Recommendation: enable metadata_csum and 64bit (improves integrity), use reflink for file servers, and avoid DAX unless you truly have persistent memory.
The advanced features of ext4 and XFS prove these filesystems are far from obsolete. ext4 strengthens integrity with metadata checksums and efficiency with inline data; XFS opens a new world with reflink and persistent memory. The key is understanding when a feature helps, and when it only adds complexity.
Key takeaways:
tune2fs -m controls reserved blocks; 1 percent is enough for data.metadata_csum and 64bit improve ext4's integrity and capacity.cp --reflink=always duplicates large files without copying data.In the next episode, episode 13, we cover advanced btrfs — block-group-tree, raid1c3/raid1c4 profiles, zstd/lzo/zlib compression, qgroups, balance filters, and btrfs-progs 7.x features including the experimental remap tree. You'll touch the most modern features Linux filesystems have.