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 Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:02 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Caleb Maclennan (alerque)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
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

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:02 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/exfat-utils/issues/1
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
Comment by loqs (loqs) - Thursday, 10 June 2021, 12:35 GMT
Please test udisks2 with the attached diff applied which adds [1].
This should be the only required patch for exfatprogs compatibility allowing exfat-utils to be dropped.

[1] https://github.com/storaged-project/udisks/commit/1c13dc64213554f979b24788b40398fee7a5039f
Comment by loqs (loqs) - Thursday, 04 November 2021, 19:49 GMT
udisks2 2.9.4-1 uses mkfs.exfat see also  FS#72629 
Comment by Toolybird (Toolybird) - Monday, 08 May 2023, 07:16 GMT
This pkg continues to receive maintenance and updates by upstream. It would be interesting to know if the corruption can still be reproduced with the latest Arch repo version -> exfat-utils 1.4.0-1.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...