Re: [exFAT] Missing O_DIRECT Support Causes Errors in Python and Affects Applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thanks for reporting this issue, I will check it.

Best Regards,
Yuezhang Mo

> -----Original Message-----

Subject: [exFAT] Missing O_DIRECT Support Causes Errors in Python and Affects Applications
> From: Noah <kernel-org-10@xxxxxxxxxxx>
> Sent: Tuesday, February 4, 2025 3:04 AM
> To: linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>
> Cc: sj1557seo <sj1557.seo@xxxxxxxxxxx>; Mo, Yuezhang <Yuezhang.Mo@xxxxxxxx>
> Subject: RE: [exFAT] Missing O_DIRECT Support Causes Errors in Python and
> Affects Applications
> 
> Hello,
> I’ve encountered an issue with the exFAT driver when attempting to create an
> empty file, resulting in the following error:
> OSError: [Errno 14] Bad address
> 
> Reproduction Steps:
> mkdir /tmp/exfat
> cd /tmp/exfat
> fallocate -l 512M exfat.img
> mkfs.exfat exfat.img
> sudo mkdir -p /fatimagedir/
> sudo mount -o umask=0022,gid=$(id -g),uid=$(id -u) /tmp/exfat/exfat.img
> /fatimagedir/
> cd /fatimagedir
> python3 -c 'open("foo", "wb", buffering=0).write(b"")'
> 
> Observations:
> 1. With the kernel exFAT driver:
> o Produces OSError: [Errno 14] Bad address on Linux 6.12.10.
> o Despite the error, the file is created.
> o As noted by Artem S. Tashkinov:
> "While this code produces an error under Linux 6.12.10, it still works as
> intended - the file is created."
> 2. With exFAT-FUSE:
> o Works as expected without errors:
> 3. sudo losetup -f exfat.img
> 4. sudo fuse/mount.exfat-fuse -o loop,umask=0022,gid=$(id -g),uid=$(id -u)
> /dev/loop0 /fatimagedir/
> 5. cd /fatimagedir
> 6. python3 -c 'open("foo", "wb", buffering=0).write(b"")'
> 7. ls
> 8. foo
> 
> Impact:
> • Affects Python's file handling and popular applications like VSCodium and
> Zed, which rely on unbuffered I/O.
> • Likely related to the lack of O_DIRECT support in the kernel exFAT driver.
> References:
> •
> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=219
> 746__;!!O7_YSHcmd9jp3hj_4dEAcyQ!26DSdhkSOyCin--7nq_pt2Bx4clOcZLGhN
> qHzpfYvg2X53YdxKXARlbJiw9JWpkiBE9d8MUbZ0lYRrYMV1a2Q99Dait6$
> •
> https://urldefense.com/v3/__https://bbs.archlinux.org/viewtopic.php?id=2948
> 37__;!!O7_YSHcmd9jp3hj_4dEAcyQ!26DSdhkSOyCin--7nq_pt2Bx4clOcZLGhNq
> HzpfYvg2X53YdxKXARlbJiw9JWpkiBE9d8MUbZ0lYRrYMV1a2Q3RhXp3D$
> •
> https://urldefense.com/v3/__https://github.com/zed-industries/zed/issues/21
> 595__;!!O7_YSHcmd9jp3hj_4dEAcyQ!26DSdhkSOyCin--7nq_pt2Bx4clOcZLGhN
> qHzpfYvg2X53YdxKXARlbJiw9JWpkiBE9d8MUbZ0lYRrYMV1a2Q6-685n9$
> Is the lack of O_DIRECT support intentional, or would this be considered for
> future implementation?
> Best regards,
> Max Grass
> 





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux