Home

Awesome

exfat-linux

This exFAT filesystem module for Linux kernel is a backport of the latest Linux mainline's exFAT drivers by Samsung.

This project can be used for everyday Linux users by simply doing make && make install. Ubuntu users can simply add a PPA and start using it, without even downloading the code. This can also be directly dropped-in to an existing Linux kernel source for building the filesystem drivers inline, which should be useful for Android kernel developers.

exfat-linux has been tested with all major LTS kernels ranging from v4.9 to v5.4 and the ones Canonical uses for Ubuntu: v4.9, v4.14, v4.19, v5.4 and v4.15, v5.3, and v5.6.

It's also been tested with x86(i386), x86_64(amd64), arm32(AArch32) and arm64(AArch64).

Linux kernels since v5.4 includes an exFAT driver, but it is an extremely outdated version from 2016. This was later revised by Samsung directly with v5.7.

People on v5.7 kernel or higher can just use the bundled exFAT drivers.

People on v5.4+ are highly recommended to use this drivers.

Support for kernel versions lower than v4.9 were dropped for easier maintenance. For people interested in exFAT support for said kernels, please use the old branch. It still works nicely and it's actively being shipped to production smartphones.

exfat-linux is planned to be maintained until Android devices with v5.7+ LTS kernel become more common.

Disclaimer

● Original authorship and copyright: Samsung

● Maintainer of exfat-linux: Park Ju Hyung(arter97)

Using exfat-linux

● Ubuntu PPA

If you're an Ubuntu user, you can simply add a PPA repository and start using the exFAT module.

Ubuntu will handle upgrades automatically as well.

  1. Add the exfat-linux repository

    sudo add-apt-repository ppa:arter97/exfat-linux
    sudo apt update
    
  2. Install the module

    sudo apt install exfat-dkms

This will use DKMS(Dynamic Kernel Module Support) and automatically build exFAT module for your current Ubuntu installation.

● Manually installing the module

  1. Download the code

    git clone https://github.com/arter97/exfat-linux
    cd exfat-linux
    
  2. Build

    make

  3. Install

    sudo make install

This will install the module to your currently running kernel.

If you're running a v5.4+ kernel, it is highly recommended to reboot at this point to prevent the existing staging exFAT drivers to load.

  1. And finally load

    sudo modprobe exfat

If you upgrade the kernel, you'll have to repeat this process.

If you want to update exfat-linux to the latest version, you'll have to repeat this process.

● Merging the drivers to existing Linux kernel source

If you're using git, using git subtree or git submodule is highly recommended.

  1. Add this repository to fs/exfat

  2. Modify fs/Kconfig

 menu "DOS/FAT/NT Filesystems"

 source "fs/fat/Kconfig"
+source "fs/exfat/Kconfig"
 source "fs/ntfs/Kconfig"
 endmenu
  1. Modify fs/Makefile
 obj-$(CONFIG_FAT_FS)    += fat/
+obj-$(CONFIG_EXFAT_FS)  += exfat/
 obj-$(CONFIG_BFS_FS)    += bfs/

And you're good to go!

Benchmarks

For reference, existing exFAT implementations were tested and compared on a server running Ubuntu 16.04 with Linux kernel 4.14 under a contained virtual machine.

Linux 4.14 was used as higher LTS kernels don't work with [exfat-nofuse] at the time of testing.

The new base backported from mainline is not benchmarked yet.

● Ramdisk

fio sequential I/O

ImplementationBaseReadWrite
exfat-linux2.2.07042 MB/s2173 MB/s
[exfat-nofuse]1.2.96849 MB/s1961 MB/s
exfat-fuseN/A3097 MB/s1710 MB/s
ext4N/A7352 MB/s3333 MB/s

fio random I/O

ImplementationBaseReadWrite
exfat-linux2.2.0760 MB/s2222 MB/s
[exfat-nofuse]1.2.9760 MB/s2160 MB/s
exfat-fuseN/A1.7 MB/s1.6 MB/s
ext4N/A747 MB/s2816 MB/s

● NVMe device

fio sequential I/O

ImplementationBaseReadWrite
exfat-linux2.2.01283 MB/s1832 MB/s
[exfat-nofuse]1.2.91285 MB/s1678 MB/s
exfat-fuseN/A751 MB/s1464 MB/s
ext4N/A1283 MB/s3356 MB/s

fio random I/O

ImplementationBaseReadWrite
exfat-linux2.2.026 MB/s1885 MB/s
[exfat-nofuse]1.2.924 MB/s1827 MB/s
exfat-fuseN/A1.6 MB/s1.6 MB/s
ext4N/A29 MB/s2821 MB/s

Mount options

Enjoy!