Giter Club home page Giter Club logo

exfat-linux's Introduction

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

Implementation Base Read Write
exfat-linux 2.2.0 7042 MB/s 2173 MB/s
[exfat-nofuse] 1.2.9 6849 MB/s 1961 MB/s
exfat-fuse N/A 3097 MB/s 1710 MB/s
ext4 N/A 7352 MB/s 3333 MB/s

fio random I/O

Implementation Base Read Write
exfat-linux 2.2.0 760 MB/s 2222 MB/s
[exfat-nofuse] 1.2.9 760 MB/s 2160 MB/s
exfat-fuse N/A 1.7 MB/s 1.6 MB/s
ext4 N/A 747 MB/s 2816 MB/s

● NVMe device

fio sequential I/O

Implementation Base Read Write
exfat-linux 2.2.0 1283 MB/s 1832 MB/s
[exfat-nofuse] 1.2.9 1285 MB/s 1678 MB/s
exfat-fuse N/A 751 MB/s 1464 MB/s
ext4 N/A 1283 MB/s 3356 MB/s

fio random I/O

Implementation Base Read Write
exfat-linux 2.2.0 26 MB/s 1885 MB/s
[exfat-nofuse] 1.2.9 24 MB/s 1827 MB/s
exfat-fuse N/A 1.6 MB/s 1.6 MB/s
ext4 N/A 29 MB/s 2821 MB/s

Mount options

  • uid

  • gid

  • umask

  • dmask

  • fmask

  • allow_utime

  • iocharset

  • quiet

  • time_offset

    • Please refer to the vfat's documentation.
  • errors=continue

    • Keep going on a filesystem error.
  • errors=panic

    • Panic and halt the machine if an error occurs.
  • errors=remount-ro

    • Remount the filesystem read-only on an error.
  • discard

    • Enable the use of discard/TRIM commands to ensure flash storage doesn't run out of free blocks. This option may introduce latency penalty on file removal operations.

Enjoy!

exfat-linux's People

Contributors

arter97 avatar geertu avatar hclee avatar hyeongseok-kim901 avatar jasonyanhw avatar joeperches avatar kohada-t2 avatar namjaejeon avatar nolange avatar pali avatar sandeen avatar valdisk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exfat-linux's Issues

Procedure to move from exfat-fuse/exfat-utils

On Ubuntu 20.04, I've been running with apt-get install exfat-fuse exfat-utils

I'm ready to install exfat-dkms (used the repo model).

Do I need to remove exfat-fuse exfat-utils first?
If no, and exfat-fuse exfat-utils is left installed, I am curious: will support for exFAT come from the dkms module or exfat-fuse exfat-utils upon next reboot?

Thank you!

timestamps incorrect timezone wrongly handled

Dear Park,

Are you also maintaining the exfat module already incorporated into the kernel?

The time stamps are incorrect .A typical use case is a digital camera with an exfat formatted SD card. I use a Sony RX100 camera and upon transferring the files to the computer all times are wrong.

Please find below the output for mounting via kernel and via exfat-fuse:

*** Mount via kernel (Linux InaUbuntu 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux)

-rwxr-xr-x 1 georg georg 20658688 2022-09-05 23:48:08.000000000 +0200 DSC01565.ARW  <==== not correct the picture was taken two hours earlier
-rwxr-xr-x 1 georg georg 20663296 2022-09-06 00:11:34.000000000 +0200 DSC01566.ARW  <==== not correct the picture was taken two hours earlier
-rwxr-xr-x 1 georg georg 20671488 2022-09-06 00:24:58.000000000 +0200 DSC01567.ARW  <==== not correct the picture was taken two hours earlier


/dev/sdc1 on /media/georg/disk type exfat (rw,nosuid,nodev,relatime,uid=1001,gid=1001,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uhelper=udisks2)

*** Mount via sudo mount.exfat-fuse /dev/sdb1 ./mount (https://github.com/relan/exfat)

-rwxrwxrwx 1 root root 20658688 2022-09-05 21:48:08.000000000 +0200 DSC01565.ARW <==== correct
-rwxrwxrwx 1 root root 20663296 2022-09-05 22:11:34.000000000 +0200 DSC01566.ARW <==== correct
-rwxrwxrwx 1 root root 20671488 2022-09-05 22:24:58.000000000 +0200 DSC01567.ARW <==== correct


/dev/sdb1 on /home/georg/mount type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

Camera with exfat formatted card & Linuxbox is on CEST+DST (+0200)

timedatectl
               Local time: Mo 2022-09-05 22:42:20 CEST
           Universal time: Mo 2022-09-05 20:42:20 UTC
                 RTC time: Mo 2022-09-05 20:42:20
                Time zone: Europe/Zurich (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

It appears that the UTC+0200 is added when establishing the files with the mounted filesystem.

Best regards,

Georg

does not support NFS export

kernel = 4.19
Did the full procedure of manually installing the module, so I should have the latest release, but still get the following error message when starting the nfs server, for which I exported 2 paths that are located on the exfat volume:

systemd[1]: Starting NFS server and services...
exportfs[2985]: exportfs: /media/usb1 does not support NFS export
exportfs[2985]: exportfs: /media/usb0 does not support NFS export
systemd[1]: nfs-server.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: nfs-server.service: Failed with result 'exit-code'.
systemd[1]: Stopped NFS server and services.

The exfat-fuse-version had also this issue in an earlier build (found some topic about it), but they did some code changes to allow nfs exports on an exfat volume.
Can you have a look into this also?

build failed on kernel 4.14

make -j1 -C "/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.14.187" KCFLAGS="-ffile-prefix-map=/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl=target-mips_24kc_musl" HOSTCFLAGS="-O2 -I/mnt/Data/Sources/openwrt/x-wrt/staging_dir/host/include -I/mnt/Data/Sources/openwrt/x-wrt/staging_dir/hostpkg/include -I/mnt/Data/Sources/openwrt/x-wrt/staging_dir/target-mips_24kc_musl/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="mips-openwrt-linux-musl-" ARCH="mips" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Fri Jul 10 10:26:47 2020" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/mnt/Data/Sources/openwrt/x-wrt/staging_dir/host/lib" KBUILD_HOSTLDLIBS="-L/mnt/Data/Sources/openwrt/x-wrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KERNELRELEASE=4.14.187 M="/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528" CONFIG_EXFAT_FS=m modules
make[3]: Entering directory '/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.14.187'
  CC [M]  /mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.o
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c: In function '__exfat_write_inode':
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:57:28: error: passing argument 2 of 'exfat_set_entry_time' from incompatible pointer type [-Werror=incompatible-pointer-types]
  exfat_set_entry_time(sbi, &inode->i_mtime,
                            ^~~~~~~~~~~~~~~
In file included from /mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:16:
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/exfat_fs.h:536:73: note: expected 'struct timespec64 *' but argument is of type 'struct timespec *'
 void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
                                                      ~~~~~~~~~~~~~~~~~~~^~
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:62:28: error: passing argument 2 of 'exfat_set_entry_time' from incompatible pointer type [-Werror=incompatible-pointer-types]
  exfat_set_entry_time(sbi, &inode->i_atime,
                            ^~~~~~~~~~~~~~~
In file included from /mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:16:
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/exfat_fs.h:536:73: note: expected 'struct timespec64 *' but argument is of type 'struct timespec *'
 void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
                                                      ~~~~~~~~~~~~~~~~~~~^~
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c: In function 'exfat_fill_inode':
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:607:17: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
  inode->i_mtime = info->mtime;
                 ^
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:608:17: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
  inode->i_ctime = info->mtime;
                 ^
/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.c:610:17: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
  inode->i_atime = info->atime;
                 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:326: recipe for target '/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.o' failed
make[4]: *** [/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/inode.o] Error 1
Makefile:1550: recipe for target '_module_/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528' failed
make[3]: *** [_module_/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528] Error 2
make[3]: Leaving directory '/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/linux-4.14.187'
Makefile:48: recipe for target '/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/.built' failed
make[2]: *** [/mnt/Data/Sources/openwrt/x-wrt/build_dir/target-mips_24kc_musl/linux-ar71xx_generic/exfat-linux-2020-07-10-ed234528/.built] Error 2
make[2]: Leaving directory '/mnt/Data/Sources/openwrt/x-wrt/feeds/x/exfat-linux'
time: package/feeds/x/exfat-linux/compile#0.89#0.42#2.81
package/Makefile:111: recipe for target 'package/feeds/x/exfat-linux/compile' failed
make[1]: *** [package/feeds/x/exfat-linux/compile] Error 2
make[1]: Leaving directory '/mnt/Data/Sources/openwrt/x-wrt'
/mnt/Data/Sources/openwrt/x-wrt/include/toplevel.mk:233: recipe for target 'package/feeds/x/exfat-linux/compile' failed
make: *** [package/feeds/x/exfat-linux/compile] Error 2

Direct IO write speed is much slower than exfat-nofuse

Exfat-linux cache IO has excellent write speed compared to Exfat-nofuse, thanks to your optimization . But direct IO is slow, with only half the write speed compared to exfat-nofuse.Exfat-linux would be perfect if this direct-IO slow problem were solved.

Add quiet mount option

Some programs, especially old ones, simply don't want to work without chmod'ing files in their directories. The quiet option on fat usually allows any chmod request, but makes it fail silently.
Other than this single problem, superb work!

Installation/build failed on Ubuntu 20.10 on RaspberryPi 3

I used the PPA for 20.04 (deb http://ppa.launchpad.net/arter97/exfat-linux/ubuntu focal main)
then i launched sudo apt install exfat-dkms
and this happened

[...]
Loading new exfat-2.2.0-3arter97-0~201910290835~ubuntu20.04.1 DKMS files...
Building for 5.8.0-1006-raspi 5.8.0-1011-raspi
Building initial module for 5.8.0-1006-raspi
Error! Bad return status for module build on kernel: 5.8.0-1006-raspi (aarch64)
Consult /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/make.log for more information.
dpkg: error processing package exfat-dkms (--configure):
 installed exfat-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...
Errors were encountered while processing:
 exfat-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
ubuntu@ubuntu:~$ 

This is the make.log file content

ubuntu@ubuntu:~$ cat /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/make.log
DKMS make.log for exfat-2.2.0-3arter97-0~201910290835~ubuntu20.04.1 for kernel 5.8.0-1006-raspi (aarch64)
Sat Jan  9 00:33:09 UTC 2021
make: Entering directory '/usr/src/linux-headers-5.8.0-1006-raspi'
  AR      /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/built-in.a
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/super.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/core.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/core_exfat.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/blkdev.o
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/super.c: In function ‘exfat_readpages’:
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/super.c:2495:9: error: implicit declaration of function ‘mpage_readpages’; did you mean ‘mpage_readpage’? [-Werror=implicit-function-declaration]
 2495 |  ret =  mpage_readpages(mapping, pages, nr_pages, exfat_get_block);
      |         ^~~~~~~~~~~~~~~
      |         mpage_readpage
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/fatent.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/cache.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/nls.o
  CC [M]  /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.o
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:290: /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/super.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:157:8: error: unknown type name ‘time_t’
  157 | static time_t accum_days_in_year[] = {
      |        ^~~~~~
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c: In function ‘exfat_time_fat2unix’:
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:166:2: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
  166 |  time_t year = tp->Year;
      |  ^~~~~~
      |  ktime_t
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:167:2: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
  167 |  time_t ld; /* leap day */
      |  ^~~~~~
      |  ktime_t
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c: In function ‘exfat_time_unix2fat’:
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:189:2: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
  189 |  time_t second = ts->tv_sec;
      |  ^~~~~~
      |  ktime_t
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:190:2: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
  190 |  time_t day, month, year;
      |  ^~~~~~
      |  ktime_t
/var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.c:191:2: error: unknown type name ‘time_t’; did you mean ‘ktime_t’?
  191 |  time_t ld; /* leap day */
      |  ^~~~~~
      |  ktime_t
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build/misc.o] Error 1
make: *** [Makefile:1783: /var/lib/dkms/exfat/2.2.0-3arter97-0~201910290835~ubuntu20.04.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.8.0-1006-raspi'
ubuntu@ubuntu:~$ 

Thank you for your support!

fstrim failed

#>> uname -a
Linux KID 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64 GNU/Linux
#>> df <mountpoint>
Filesystem     Type   Size  Used Avail Use% Mounted on
<block>        exfat  ****  ****  ****  *** <mountpoint>
#>> fstrim -v <mountpoint>
fstrim: <mountpoint>: FITRIM ioctl failed: Unknown error 524

exfat-dkms version: 2.2.0-3arter97

there is not enough continue memory for super block.

04-17 02:19:20.788 672 11313 D vold : Totally 87 directories and 18 files.
04-17 02:19:20.788 672 11313 D vold :
04-17 02:19:20.788 672 11313 D vold : File system checking finished. No errors found.
04-17 02:19:20.788 672 11313 D vold :
04-17 02:19:20.788 672 11313 I vold : Check OK
04-17 02:19:20.816 672 11313 E vold : Mount failed; attempting read-only: Out of memory
04-17 02:19:20.818 672 11313 E vold : public:8,97 failed to mount /dev/block/vold/public:8,97: Out of memory

04-17 02:19:20.662 0 0 W Binder : 672_7: page allocation failure: order:4, mode:0x60c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null)
04-17 02:19:20.662 0 0 I Binder : 672_7 cpuset=foreground mems_allowed=0
04-17 02:19:20.662 0 0 I : CPU: 7 PID: 11313 Comm: Binder:672_7 Tainted: G S W O 4.19.81-perf+ #1
04-17 02:19:20.662 0 0 I Call trace:
04-17 02:19:20.662 0 0 I : dump_backtrace+0x0/0x1a0
04-17 02:19:20.662 0 0 I : show_stack+0x20/0x30

3 UtcOffset fields missing from FILE_DENTRY_T and access_time_ms does not actually exist

As described in the exFAT Spec a File Directory Entry includes UtcOffsets for the three timestamps (and 7 bytes reserved). This implementation incorrectly says access_time_ms (and 9 bytes reserved) which does not actually exist, that byte is actually CreateUtcOffset.

The 3 UtcOffset fields currently always being set to 0x00 indicates the timestamps are local time in an unknown timezone, which is awkwardly misinterpreted when filesystems written with exfat linux are remounted on macOS and Windows etc. Conversely, exfat filesystems written by other OSs include timezone information on every timestamp that is being ignored when mounted in Linux so the UTC time is incorrectly offset, differently for each file if they were written from different timezones.

To correctly support timestamps when remounting from Linux to other OSs: Minimal support would be to always set these three bytes to 0x80 to indicate that the timestamps are valid UTC times which should then be interpreted correctly by other exfat drivers.

To correctly support timestamps when remounting from other OSs to Linux: when reading timestamps the non-UTC UtcOffsets should offset timestamps to calculate the UTC timestamp as per the spec.

The complicated effects of this missing support (and an odd quirk of the macOS exfat timezone support) is described in detail here by Adam Harrison:
https://blog.1234n6.com/2018/06/exfat-timestamp-behavior-associated_30.html
https://blog.1234n6.com/2018/07/exfat-timestamps-exfat-primer-and-my.html

fallocate issue

exfat linux doesn't support fallocate
When running command fallocate -l 1G test1G
command failed with output

fallocate -l 1G test1g
fallocate: fallocate failed: Operation not supported

Slow truncate with exFAT

When you send (via Samba share) a 2GB file to an exfat partition, there is an initial truncate() to set the filesize, and then the real file content is written (see Samba source here). It is probably the same with many other sharing/syncing tools. See similar issue in exfat-fuse.

When doing this with exfat :

  • a first pass of writing 2 GB of "null bytes" is done
  • then the 2 GB file content data is written

So a total of 4 GB is written, and this doubles the file transfer time, and the GB written on disk!

Question @arter97 : how to modify your driver such that a f.truncate(2*1000*1000*1000) does not write 2 GB of null bytes immediately?

Example 1 (NTFS)

with open('file.bin', 'wb') as f:
    f.write(b'hello')
    f.truncate(1000*1000*1000)
# takes < 1 second

Example 2 : same code with exFAT takes ... 30 seconds !

Build fails with linux 5.8.1

Building via DKMS fails with linux 5.8.1 with the following messages:

CC [M]  /var/lib/dkms/exfat-5.8/1/build/inode.o
/var/lib/dkms/exfat-5.8/1/build/inode.c: In function ‘exfat_readpages’:
/var/lib/dkms/exfat-5.8/1/build/inode.c:367:9: error: implicit declaration of function ‘mpage_readpages’; did you mean ‘mpage_readpage’? [-Werror=implicit-function-declaration]
  367 |  return mpage_readpages(mapping, pages, nr_pages, exfat_get_block);
      |         ^~~~~~~~~~~~~~~
      |         mpage_readpage
cc1: some warnings being treated as errors

mkfs.exfat not found

I can successfully install this driver, but then mkfs.exfat isn't available.
It seems to be part of exfat-utils, but when doing:

apt install exfat-utils

it wants to install exfat-fuse as a dependency, which I don't want.

How to have mkfs.exfat without having the FUSE version?

d_type direntry

Add support for direntry d_type so ExFAT can be used as lower layer in OverlayFS.

misc.c : unknown type name 'time_t' when building on 5.6 kernel

Yes, i know about the rebase, but thought I'd log this anyway. Got a couple instances of this error when building on newly released 5.6 kernel (5.6.6).

  CC [M]  ...misc.o
.../misc.c:157:8: error: unknown type nametime_t157 | static time_t accum_days_in_year[] = {
      |        ^~~~~~
.../misc.c: In functionexfat_time_fat2unix’:
.../misc.c:166:2: error: unknown type nametime_t’; did you meanktime_t’?
  166 |  time_t year = tp->Year;
      |  ^~~~~~
      |  ktime_t
.../misc.c:167:2: error: unknown type nametime_t’; did you meanktime_t’?
  167 |  time_t ld; /* leap day */
      |  ^~~~~~
      |  ktime_t
.../misc.c: In functionexfat_time_unix2fat’:
.../misc.c:189:2: error: unknown type nametime_t’; did you meanktime_t’?
  189 |  time_t second = ts->tv_sec;
      |  ^~~~~~
      |  ktime_t
.../misc.c:190:2: error: unknown type nametime_t’; did you meanktime_t’?
  190 |  time_t day, month, year;
      |  ^~~~~~
      |  ktime_t
.../misc.c:191:2: error: unknown type nametime_t’; did you meanktime_t’?
  191 |  time_t ld; /* leap day */
      |  ^~~~~~
      |  ktime_t

I did try the suggestion and it seems to have worked, but it's hardly scientific. ;)

FAT_IOCTL_GET_ATTRIBUTES

Hi!

I was trying to get file attributes from a exfat fs using fatattr utility but looks like the ioctl call is not implemented.

Is there a way to get/set FAT file attributes (Archive, Read-Only, Hidden, System) from linux on a exfat FS?

Thanks

Add (fake) symlink support

exfat-nofuse supports symlinks.

It doesn't look too difficult to port over the code from nofuse that handles symlinks.

Non-exhaustive list of changes:

  • Add definitions for TYPE_SYMLINK and ATTR_SYMLINK to exfat_fs.h and exfat_raw.h
  • Add target to exfat_inode_info struct (?)
  • Update exfat_set_entry_type to set attributes when encountering a symlink
  • Update exfat_make_mode in exfat_super.h
  • Add exfat_symlink_inode_operations in file.c along with definitions of exfat_follow_link / exfat_get_link
  • Update exfat_fill_inode in inode.c to call exfat_symlink_inode_operations when dealing with a symlink
  • Add exfat_symlink to namei.c to handle symlink creation
  • Update inode_operations to add .symlink
  • Update exfat_lookup to handle symlinks
  • Anything that is missing from this list...

I'm hacking my way through the list, if I get to the point where I can get symlinks to work I'll raise a PR. If anyone wants to tackle this in the meantime, that would be swell :)

NFS - exportfs: does not support NFS export

Hi,
I'm using your driver on Raspbian Buster, and it works fine and fast for my exfat USB disk.
I'm trying to export the mountpoint via NFS now, but whatever I do, I get the message that the mountpoint does not support NFS export.
From what I understand this also needs to be enabled in the driver? Correct?
Is it? And if not, can it be?
If it is, can you maybe help me with the NFS export of my exfat drive?
Many thanks for looking into this...
Br, T

Build error when CONFIG_GCC_PLUGIN_RANDSTRUCT enabled in kernel.

/usr/src/exfat-linux/fatent.c:97:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
   97 |  exfat_ent_get,
      |  ^~~~~~~~~~~~~
/usr/src/exfat-linux/fatent.c:97:2: note: (near initialization for ‘exfat_ent_ops’)
/usr/src/exfat-linux/fatent.c:97:2: error: invalid initializer
/usr/src/exfat-linux/fatent.c:97:2: note: (near initialization for ‘exfat_ent_ops.<anonymous>’)
/usr/src/exfat-linux/fatent.c:98:2: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
   98 |  exfat_ent_set
      |  ^~~~~~~~~~~~~
/usr/src/exfat-linux/fatent.c:98:2: note: (near initialization for ‘exfat_ent_ops’)
cc1: some warnings being treated as errors

Reproduces in 5.3.0 and 5.2.14
I have no ideas how to properly fix it so no patch submitted.

Move symlink support to fatfs

Since data structures are almost the same for all FAT filesystems, can be the symlinks support being ported to the abstract fatfs filesystem, so support for them is available for all FAT filesystems, not only ExFAT? The reserved field is available in all of them...

Issue with Kernel 5.8.0-38-generic

$ sudo apt install exfat-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
exfat-dkms
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
Need to get 69.7 kB of archives.
After this operation, 387 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/arter97/exfat-linux/ubuntu focal/main amd64 exfat-dkms all 2.2.0-3arter97-0201910290835ubuntu20.04.1 [69.7 kB]
Fetched 69.7 kB in 2s (30.6 kB/s)
Selecting previously unselected package exfat-dkms.
(Reading database ... 214465 files and directories currently installed.)
Preparing to unpack .../exfat-dkms_2.2.0-3arter97-0201910290835ubuntu20.04.1_all.deb ...
Unpacking exfat-dkms (2.2.0-3arter97-0201910290835ubuntu20.04.1) ...
Setting up exfat-dkms (2.2.0-3arter97-0201910290835ubuntu20.04.1) ...
Loading new exfat-2.2.0-3arter97-0201910290835ubuntu20.04.1 DKMS files...
Building for 5.8.0-38-generic
Building initial module for 5.8.0-38-generic
Error! Bad return status for module build on kernel: 5.8.0-38-generic (x86_64)
Consult /var/lib/dkms/exfat/2.2.0-3arter97-0201910290835ubuntu20.04.1/build/make.log for more information.
dpkg: error processing package exfat-dkms (--configure):
installed exfat-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
exfat-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

Write throughput degradation on second file created after a format, if in subdirectory

Using fio to benchmark exfat performance for my video record application. After performing a format, the second file created has around 20% slower write throughput than the first one, if both file are in different subdirectories of my drive.

Attaching my fio script below. Steps to reproduce:

  1. Format drive:
    mkexfatfs -s 2048 -n cfast /dev/sdb1

  2. Set the root directory for fio script create subdirectory and run first test.
    export MEDIA_MOUNT=/media/liem/cfast
    mkdir -p ${MEDIA_MOUNT}/dir1
    fio --section=subdir_1 exfat.job
    Results:

WRITE: bw=2032MiB/s (2130MB/s)

  1. Create second subdirectory and run second test.
    mkdir -p ${MEDIA_MOUNT}/dir2
    fio --section=subdir_2 exfat.job
    Results:

WRITE: bw=1611MiB/s (1690MB/s)

  1. Writing to second file in second subdirectory is much slower 1690MB/s vs 2130MB/s.

  2. Now reformat and run test again but keep files in same directory.
    mkexfatfs -s 2048 -n cfast /dev/sdb1

  3. Write test to first file
    fio --section=no_subdir_1 exfat.job
    Results:

WRITE: bw=2036MiB/s (2135MB/s)

  1. Write test to second file
    fio --section=no_subdir_2 exfat.job
    Results:

WRITE: bw=2002MiB/s (2099MB/s)

  1. Pretty much the same throughput in this test 2099 MB/s vs 2135 MB/s.

  2. My test environment:
    Ubuntu 18.04.1 LTS on HP Z230 desktop Intel i7.
    kernel: 4.15.0-70-generic
    Sony cFAST card connected with Xcellon cFAST card reader formatted with exFAT.
    Using tag 2.2.0-3arter97 of exfat-linux.

  3. My fio test script exfat.job:

; fio test sequential write jobs
; MEDIA_MOUNT is the root directory of the mounted card, e.g. /media/liem/cfast

[global]
rw=write
ioengine=sync
numjobs=1
fallocate=none
blocksize=4MB
filesize=2GB
create_on_open=1

[subdir_1]
filename=${MEDIA_MOUNT}/dir1/test1.bin

[subdir_2]
filename=${MEDIA_MOUNT}/dir2/test2.bin

[no_subdir_1]
filename=${MEDIA_MOUNT}/test1.bin

[no_subdir_2]
filename=${MEDIA_MOUNT}/test2.bin

File names ending with a period

Is it possible to add support for file names without an extension like "test." with a period at the end? Because right now it is not compatible with ecryptfs.

Improve mapping of attributes to UNIX permissions

Original issue with more in-detail explains at dorimanx/exfat-nofuse#118

Use FAT attributes and unused reserved bit fields to provide POSIX like permissions. Obviously permissions can't be the same, but workarounds can be find:

  • ATTR_DEVICE field can be reused for execution permission, similar to what's being done by reusing the ATTR_VOLUME attribute field to add support for symlinks. This is the feature I'm more interested :-)
  • ATTR_HIDDEN to disable read permission, similar to ATTR_READONLY being currently used by fatfs filesystem for read permission

Additionally, it could be possible to add multi-user in two ways:

  • ATTR_SYSTEM to allow access only to the file only to root (or other "owner user") instead of everybody. It's simple to implement since It's like a simple users management system of priviledged user vs. anybody else
  • use reserved fields to store UID and GID data, similar to how DR-DOS added users and access permissions. Problem here is that these exact bits are being used by ExFAT, but there are other free ones at the end of the structure

Transient page allocation failure on 4.19

uname:

Linux chowie-desktop 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

free:

              total        used        free      shared  buff/cache   available
Mem:       16356524     7470612     1138208      278212     7747704     8358364
Swap:       8384508     2810380     5574128

Attempting to mount an 8TiB volume resulted in a page allocation failure. I tried a few more times and eventually the mount succeeded.

Here is the kernel log from one of the failed attempts:

[1067668.178473] mount: page allocation failure: order:5, mode:0x60c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null)
[1067668.178476] mount cpuset=/ mems_allowed=0
[1067668.178486] CPU: 3 PID: 3256 Comm: mount Tainted: P        W  OE     4.19.0-10-amd64 #1 Debian 4.19.132-1
[1067668.178488] Hardware name: System76, Inc. Wild Dog Pro/Desktop, BIOS F4 03/25/2016
[1067668.178489] Call Trace:
[1067668.178503]  dump_stack+0x66/0x90
[1067668.178510]  warn_alloc.cold.120+0x6c/0xec
[1067668.178516]  __alloc_pages_slowpath+0xc73/0xcb0
[1067668.178521]  ? radix_tree_lookup_slot+0x1e/0x50
[1067668.178526]  ? find_get_entry+0x19/0xf0
[1067668.178533]  ? __find_get_block+0xb4/0x2d0
[1067668.178538]  __alloc_pages_nodemask+0x28b/0x2b0
[1067668.178545]  kmalloc_order+0x14/0x30
[1067668.178550]  kmalloc_order_trace+0x1d/0xa0
[1067668.178562]  exfat_create_upcase_table+0x106/0x390 [exfat]
[1067668.178572]  exfat_fill_super+0x4e3/0x8f0 [exfat]
[1067668.178580]  ? exfat_remount+0x50/0x50 [exfat]
[1067668.178586]  mount_bdev+0x177/0x1b0
[1067668.178592]  mount_fs+0x3e/0x145
[1067668.178598]  vfs_kern_mount.part.36+0x54/0x120
[1067668.178603]  do_mount+0x20e/0xcc0
[1067668.178608]  ? _copy_from_user+0x37/0x60
[1067668.178613]  ? memdup_user+0x4b/0x70
[1067668.178618]  ksys_mount+0xb6/0xd0
[1067668.178623]  __x64_sys_mount+0x21/0x30
[1067668.178629]  do_syscall_64+0x53/0x110
[1067668.178635]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[1067668.178639] RIP: 0033:0x7fb772b46fea
[1067668.178644] Code: 48 8b 0d a9 0e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 76 0e 0c 00 f7 d8 64 89 01 48
[1067668.178646] RSP: 002b:00007ffde2801d98 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[1067668.178650] RAX: ffffffffffffffda RBX: 00005596bc078a40 RCX: 00007fb772b46fea
[1067668.178652] RDX: 00005596bc081c70 RSI: 00005596bc07b960 RDI: 00005596bc078c50
[1067668.178654] RBP: 00007fb772e941c4 R08: 0000000000000000 R09: 00007fb772c090a0
[1067668.178656] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[1067668.178658] R13: 0000000000000000 R14: 00005596bc078c50 R15: 00005596bc081c70
[1067668.178662] warn_alloc_show_mem: 1 callbacks suppressed
[1067668.178663] Mem-Info:
[1067668.178672] active_anon:1102088 inactive_anon:236499 isolated_anon:0
                  active_file:1150883 inactive_file:475014 isolated_file:0
                  unevictable:20902 dirty:26066 writeback:16 unstable:0
                  slab_reclaimable:106038 slab_unreclaimable:141826
                  mapped:143154 shmem:69835 pagetables:25703 bounce:0
                  free:442318 free_pcp:47 free_cma:0
[1067668.178679] Node 0 active_anon:4408352kB inactive_anon:945996kB active_file:4603532kB inactive_file:1900056kB unevictable:83608kB isolated(anon):0kB isolated(file):0kB mapped:572616kB dirty:104264kB writeback:64kB shmem:279340kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 200704kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[1067668.178681] Node 0 DMA free:15888kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15980kB managed:15896kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
[1067668.178688] lowmem_reserve[]: 0 2024 15911 15911 15911
[1067668.178693] Node 0 DMA32 free:411428kB min:8588kB low:10732kB high:12876kB active_anon:645192kB inactive_anon:153448kB active_file:424272kB inactive_file:132572kB unevictable:0kB writepending:10420kB present:2181712kB managed:2116144kB mlocked:0kB kernel_stack:5200kB pagetables:8656kB bounce:0kB free_pcp:168kB local_pcp:0kB free_cma:0kB
[1067668.178701] lowmem_reserve[]: 0 0 13886 13886 13886
[1067668.178704] Node 0 Normal free:1341956kB min:58928kB low:73660kB high:88392kB active_anon:3763160kB inactive_anon:792548kB active_file:4179260kB inactive_file:1767736kB unevictable:83608kB writepending:94004kB present:14508032kB managed:14224484kB mlocked:83608kB kernel_stack:48000kB pagetables:94156kB bounce:0kB free_pcp:20kB local_pcp:0kB free_cma:0kB
[1067668.178712] lowmem_reserve[]: 0 0 0 0 0
[1067668.178716] Node 0 DMA: 0*4kB 0*8kB 1*16kB (U) 0*32kB 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15888kB
[1067668.178730] Node 0 DMA32: 59199*4kB (UME) 15005*8kB (UME) 2568*16kB (UME) 392*32kB (UME) 26*64kB (UME) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 412132kB
[1067668.178743] Node 0 Normal: 200753*4kB (UMEH) 57928*8kB (UMEH) 4661*16kB (UMEH) 28*32kB (UMEH) 7*64kB (H) 2*128kB (H) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1342612kB
[1067668.178759] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[1067668.178761] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[1067668.178763] 1749186 total pagecache pages
[1067668.178767] 73125 pages in swap cache
[1067668.178769] Swap cache stats: add 10028345, delete 9956150, find 5017586/7293913
[1067668.178771] Free swap  = 5573772kB
[1067668.178772] Total swap = 8384508kB
[1067668.178774] 4176431 pages RAM
[1067668.178775] 0 pages HighMem/MovableOnly
[1067668.178776] 87300 pages reserved
[1067668.178778] 0 pages hwpoisoned
[1067668.180775] mount: page allocation failure: order:5, mode:0x60c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null)
[1067668.180776] mount cpuset=/ mems_allowed=0
[1067668.180784] CPU: 3 PID: 3256 Comm: mount Tainted: P        W  OE     4.19.0-10-amd64 #1 Debian 4.19.132-1
[1067668.180786] Hardware name: System76, Inc. Wild Dog Pro/Desktop, BIOS F4 03/25/2016
[1067668.180788] Call Trace:
[1067668.180797]  dump_stack+0x66/0x90
[1067668.180803]  warn_alloc.cold.120+0x6c/0xec
[1067668.180809]  __alloc_pages_slowpath+0xc73/0xcb0
[1067668.180814]  ? radix_tree_lookup_slot+0x1e/0x50
[1067668.180818]  ? find_get_entry+0x19/0xf0
[1067668.180825]  ? __find_get_block+0xb4/0x2d0
[1067668.180830]  __alloc_pages_nodemask+0x28b/0x2b0
[1067668.180836]  kmalloc_order+0x14/0x30
[1067668.180841]  kmalloc_order_trace+0x1d/0xa0
[1067668.180851]  exfat_create_upcase_table+0x292/0x390 [exfat]
[1067668.180860]  exfat_fill_super+0x4e3/0x8f0 [exfat]
[1067668.180867]  ? exfat_remount+0x50/0x50 [exfat]
[1067668.180873]  mount_bdev+0x177/0x1b0
[1067668.180879]  mount_fs+0x3e/0x145
[1067668.180885]  vfs_kern_mount.part.36+0x54/0x120
[1067668.180890]  do_mount+0x20e/0xcc0
[1067668.180895]  ? _copy_from_user+0x37/0x60
[1067668.180900]  ? memdup_user+0x4b/0x70
[1067668.180905]  ksys_mount+0xb6/0xd0
[1067668.180910]  __x64_sys_mount+0x21/0x30
[1067668.180916]  do_syscall_64+0x53/0x110
[1067668.180921]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[1067668.180924] RIP: 0033:0x7fb772b46fea
[1067668.180928] Code: 48 8b 0d a9 0e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 76 0e 0c 00 f7 d8 64 89 01 48
[1067668.180930] RSP: 002b:00007ffde2801d98 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[1067668.180933] RAX: ffffffffffffffda RBX: 00005596bc078a40 RCX: 00007fb772b46fea
[1067668.180935] RDX: 00005596bc081c70 RSI: 00005596bc07b960 RDI: 00005596bc078c50
[1067668.180937] RBP: 00007fb772e941c4 R08: 0000000000000000 R09: 00007fb772c090a0
[1067668.180939] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
[1067668.180941] R13: 0000000000000000 R14: 00005596bc078c50 R15: 00005596bc081c70
[1067668.180947] exFAT-fs (sdf2): failed to load upcase table
[1067668.180955] exFAT-fs (sdf2): failed to recognize exfat type

modprobe exfat return an error.

git clone, make, make install,every thing is ok.
This is the modinfo exfat infos:
modinfo exfat
filename: /lib/modules/3.10.40-lasyka+/ext_modules/exfat.ko
author: Samsung Electronics Co., Ltd.
description: FAT/exFAT filesystem support
license: GPL
alias: fs-exfat
depends:
vermagic: 3.10.40-lasyka+ SMP preempt mod_unload ARMv7

but when modprobe exfat return an error:
modprobe exfat
modprobe: ERROR: could not insert 'exfat': Unknown symbol in module, or unknown parameter.
and the dmesg show this error:
exfat: Unknown symbol GLOBAL_OFFSET_TABLE (err 0)

exfat mount option codepage not work

mount -t exfat -o codepage=cp437 /dev/sda1 /mnt/sda1
mount: mounting /dev/sda1 on /mnt/sda1/ failed: Invalid argument

and

mount -t exfat /dev/sda1 /mnt/sda1
work and codepage is default to cp936 on my ubuntu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.