Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#69439 - [exfat-utils] FS corruprion for 64+ GB partitions

Attached to Project: Community Packages
Opened by Eugene Shalygin (eshalygin) - Monday, 25 January 2021, 16:41 GMT
Last edited by David Runge (dvzrv) - Monday, 25 January 2021, 16:46 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Levente Polyak (anthraxx)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description: the exfat driver from this package (unlike the one from the kernel) can't read 64+ GB cards formatted by Canon cameras (G7X Mark II, M6 Mark II). Mounting cards leads to filesystem corruption and data loss.

Example dmesg output:

```
[58112.416738] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416751] print_req_error: 41 callbacks suppressed
[58112.416756] blk_update_request: I/O error, dev sdd, sector 125042560 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[58112.416802] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416809] blk_update_request: I/O error, dev sdd, sector 125042560 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416814] buffer_io_error: 39 callbacks suppressed
[58112.416817] Buffer I/O error on dev sdd, logical block 125042560, async page read
[58112.416842] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416848] blk_update_request: I/O error, dev sdd, sector 125042561 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416852] Buffer I/O error on dev sdd, logical block 125042561, async page read
[58112.416870] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416875] blk_update_request: I/O error, dev sdd, sector 125042562 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416879] Buffer I/O error on dev sdd, logical block 125042562, async page read
[58112.416896] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416901] blk_update_request: I/O error, dev sdd, sector 125042563 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416905] Buffer I/O error on dev sdd, logical block 125042563, async page read
[58112.416922] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416927] blk_update_request: I/O error, dev sdd, sector 125042564 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416931] Buffer I/O error on dev sdd, logical block 125042564, async page read
[58112.416947] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416952] blk_update_request: I/O error, dev sdd, sector 125042565 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416956] Buffer I/O error on dev sdd, logical block 125042565, async page read
[58112.416973] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.416978] blk_update_request: I/O error, dev sdd, sector 125042566 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.416982] Buffer I/O error on dev sdd, logical block 125042566, async page read
[58112.416999] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.417004] blk_update_request: I/O error, dev sdd, sector 125042567 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.417008] Buffer I/O error on dev sdd, logical block 125042567, async page read
[58112.472234] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.472242] blk_update_request: I/O error, dev sdd, sector 125042560 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[58112.472247] Buffer I/O error on dev sdd, logical block 125042560, async page read
[58112.472253] sd 6:0:0:0: [sdd] tag#0 access beyond end of device
[58112.472255] Buffer I/O error on dev sdd, logical block 125042561, async page read
```

Additional info:
* package version(s) 1.3.0-2
This task depends upon

Comment by ketsui (ketsui) - Saturday, 27 February 2021, 07:50 GMT
The new exFAT implementation that replaced the one in staging was merged in 5.7[0], considering all kernels in the official repo is newer than that maybe it's time to remove exfat-utils and tell people to switch to the upstream driver.

[0] https://kernelnewbies.org/Linux_5.7#New_exFAT_file_system
Comment by Peter Weber (hoschi) - Monday, 22 March 2021, 00:18 GMT
I'm with you and prefer exfatprogs i.e. mkfs.exfat with the built-in implementation. But? The program gnome-disk-utility (currently 3.38.x) seems to require exfat-utils (fuse) and fails to format a memory card or stick with a rather cryptic message, when exfat-utils is not installed. Actually neither package listed as dependency and I cannot find information about that the upstream repository. Probably there are more similar cases?

// edit
https://archlinux.org/packages/extra/x86_64/udisks2/
List some optional dependencies.
Comment by loqs (loqs) - Monday, 22 March 2021, 01:36 GMT
@hoschi what if you change the command in [1] from mkexfatfs to mkfs.exfat? Both use the same arguments but mkfs.exfat looks to be supported by both packages.

https://github.com/storaged-project/udisks/blob/udisks-2.9.2/src/udiskslinuxfsinfo.c#L124
Comment by Andrea Amorosi (AndreaA) - Monday, 22 March 2021, 18:42 GMT
KDE Partition Manager too complains that it cannot modify exfat partitions if exfat-utils is not installed (I have exfatprogrs correctly installed).
Comment by Peter Weber (hoschi) - Monday, 22 March 2021, 18:53 GMT
@loqs: I've not tested it but hope the necessary modifications are small. For example the '-n' needs to become a '-L'. I suggest we contact upstream about that, the maintainers cannot lift the connection between GNOMEs and KDEs disk utilities and exfat-utils.
Comment by Eugene Shalygin (eshalygin) - Monday, 22 March 2021, 19:27 GMT
The problem is in the FUSE, so exfat-utils-nofuse from AUR solves that. BTW, Gentoo somehow installs this package without the FUSE module, and I can't find why does the Gentoo build with default options and no patches results in FUSE-less package.
Comment by loqs (loqs) - Monday, 22 March 2021, 20:31 GMT
@hoschi please try applying the attached diff. Adds mkexfatfs to exfatprogs as a symlink to mkfs.exfat.
The help text references the original command name but for testing it should be enough.
Edit:
Or try PKGBUILD.udisks2.diff that modifies udisks2 which is used by gnome and KDE.
Comment by loqs (loqs) - Friday, 23 April 2021, 00:26 GMT
Someone reported the issue upstream:
https://github.com/storaged-project/udisks/issues/882

Loading...