dorimanx / exfat-nofuse

Android ARM Linux non-fuse read/write kernel driver for exFat and VFat Android file systems
GNU General Public License v2.0
707 stars 326 forks source link

Automatically remounted as read only due to 'sector_read: out of range error!' (4.15.15-300 Fedora 27 x86_64) #131

Open redxio opened 6 years ago

redxio commented 6 years ago

mount partition: [user@localhost Downloads]$ sudo mount -t exfat -o defaults,uid=1000,gid=1000 /dev/sda6 /mnt/SharedDisk/ And when i access the mounted directory, it will occur error as described in title, umount and mount as read-write again, still so. Kernel output: [user@bogon Downloads]$ dmesg | grep -i "exfat" [ 1399.799091] exfat: loading out-of-tree module taints kernel. [ 1399.799349] exfat: module verification failed: signature and/or required key missing - tainting kernel [ 1399.805464] exFAT: Version 1.2.9 [ 1399.806209] [EXFAT] trying to mount... [ 1400.559466] [EXFAT] mounted successfully [ 1494.239231] [EXFAT] sector_read: out of range error! (sec = 33429809600) [ 1494.239233] [EXFAT] Filesystem has been set read-only [ 2100.845660] [EXFAT] trying to unmount... [ 2100.845898] [EXFAT] unmounted successfully [ 2152.664499] [EXFAT] trying to mount... [ 2153.437465] [EXFAT] mounted successfully [ 2177.730035] [EXFAT] sector_read: out of range error! (sec = 33429809600) [ 2177.730039] [EXFAT] Filesystem has been set read-only

Partition details: [user@bogon Downloads]$ sudo fdisk -l /dev/sda Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: ADF4DF30-D7C6-4012-ABE7-C422304766C8

Device Start End Sectors Size Type /dev/sda1 2048 1023999 1021952 499M Windows recovery environment /dev/sda2 1024000 1228799 204800 100M EFI System /dev/sda3 1228800 1261567 32768 16M Microsoft reserved /dev/sda4 1261568 105064447 103802880 49.5G Microsoft basic data /dev/sda5 105064448 314779647 209715200 100G Microsoft basic data /dev/sda6 314779648 767051782 452272135 215.7G Microsoft basic data /dev/sda7 767053824 769150975 2097152 1G Linux filesystem /dev/sda8 769150976 976773119 207622144 99G Linux LVM

The exfat partition is /dev/sda6 code block where produce error : https://github.com/dorimanx/exfat-nofuse/blob/de4c760bc9a05ead83bc3ec6eec6cf1fb106f523/exfat_core.c#L5047

satchamo commented 5 years ago

What's your block size on the exfat partition (stat -fc %s /mnt/SharedDisk/)? I had problems with a 4096 byte block size. Switching to 131072 (128K) seemed to eliminate the problem (although I've only been testing for 1 day).