Summary: | sysutils/fusefs-exfat: add support for CREATE operations | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | danny | ||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | bright.boat3517, cs, jbeich, samm | ||||
Priority: | --- | Keywords: | needs-qa, patch | ||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Bug Depends on: | 210823 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
danny
2015-05-03 07:35:21 UTC
Hi, which version of FreeBSD you are using? It was working for me before, so probably some recent changes in fuse/bsd support? Apologies, can't believe I left that out! $ uname -r -s -m FreeBSD 10.1-RELEASE-p6 amd64 $ pkg info | grep fuse fusefs-exfat-1.0.1 Full-featured exFAT FS implementation as a FUSE module fusefs-libs-2.9.3_4 FUSE allows filesystem implementation in userspace It seems to be a bug of the FreeBSD implementation, see http://fuse.sourceforge.net/doxygen/structfuse__operations.html#a97243e0f9268a96236bc3b6f2bacee17 . "If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the mknod() and open() methods will be called instead." I would recommend to report bug to the upstream because it should affect not only exfat, but every pre-2.5 filesystem. Anyway, lets keep this PR open, I will try to check myself. It seems to be an issue with fuse-libs. Thanks, and agreed! From looking at the changelogs, it looks like the feature you are referring to was introduced in fusefs back in 2005. So it probably isn't a recent upstream change causing this, but instead something with the kernel fuse module introduced in FreeBSD 10.x. I stumbled on a resolved PR (bug #192563) for sysutils/fusefs-encfs that deals with the same issue, and has a very similar patch to the one I submitted (that would have saved me some time!). There is another PR (bug #187485) against sysutils/fusefs-wdfs with a similar patch, but that port was dropped so it was never applied. So we know that this applies to all fusefs modules running under 10.x, and that other modules have hacked in a create -> mknod+open wrapper to get things working (just to confirm that it is a sane workaround). Agreed about figuring out where the real issue is coming from, I will do more research as I can't find the source of the problem in the kernel source at a glance. I should probably file a bug against the fuse kernel module. I can reproduce this issue on 9.1 install with recent ports. As far as i could see - it is kernel driver issue. In Linux it is handled by http://lxr.free-electrons.com/source/fs/fuse/dir.c#L499 but in FreeBSD there is no such code, it will just fail. Also i found that kmod-fuse was backported from 10.0 source to 9.x port, that explains why it stops working on 9.1 as well. So this needs to be addressed in the kernel module, not in fs. I created PR for the fuse kernel module, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199934 Thank you for digging deeper and filing a new PR against the kernel module, I will keep an eye on the other PR as well. This bug still exists on 10.2-RELEASE. Below are steps to repro the bug without needed a physical exfat device available. I still get "invalid argument" when trying to create a new file via fuse-exfat. The patch I submitted still fixes the problem fusefs-exfat, but the fix should probably be implemented lower down in the kernel mod as per PR #199934. Example of problem on 10.2-RELEASE: $ uname -r 10.2-RELEASE $ mkdir testdir $ touch testfile touch: testfile: Invalid argument Bug repro steps: # Create empty file dd if=/dev/zero of=fuse-exfat-test bs=1k count=5k # Attach as memory disk, grab the device number as $MD MD=`mdconfig -f fuse-exfat-test` # Format as exfat mkexfatfs /dev/$MD # Mount the new filesystem via fuse-exfat mount.exfat-fuse /dev/$MD /mnt # Attempt to create a new directory and file on device cd /mnt mkdir testdir touch testfile Still seeing this issue on 10.3. Essentially prevents me from creating folders and writing files to my ExFat drive. Is there no fix in the works? Fixed upstream since v1.2.0. I plan to close this bug once bug 210823 lands. https://github.com/relan/exfat/commit/5b42458 (In reply to Jan Beich from comment #12) Thanks for keeping an eye on this, I appreciate it. Looking forward to upstream fix being applied in the future! A commit references this bug: Author: jbeich Date: Mon Jul 18 18:30:00 UTC 2016 New revision: 418728 URL: https://svnweb.freebsd.org/changeset/ports/418728 Log: sysutils/*exfat*: update to 1.2.4 - Chase project move to GitHub - Chase patent licensing URL [1] - Restore GPLv2 after r328060 [2] - Fix build on DragonFly - Drop unused iconv dependency PR: 199874, 210823 PR: 210162 [1] Suggested by: decke, tijl [2] (via bug 193629) Approved by: maintainer timeout (2 weeks) MFH: 2016Q3 Changes: head/sysutils/exfat-utils/Makefile head/sysutils/exfat-utils/distinfo head/sysutils/exfat-utils/files/patch-SConstruct head/sysutils/exfat-utils/files/patch-libexfat_platform.h head/sysutils/exfat-utils/files/patch-ublio head/sysutils/exfat-utils/pkg-descr head/sysutils/fusefs-exfat/Makefile head/sysutils/fusefs-exfat/distinfo head/sysutils/fusefs-exfat/files/patch-SConstruct head/sysutils/fusefs-exfat/files/patch-libexfat_platform.h head/sysutils/fusefs-exfat/files/patch-ublio head/sysutils/fusefs-exfat/pkg-descr A commit references this bug: Author: jbeich Date: Mon Jul 18 20:26:09 UTC 2016 New revision: 418745 URL: https://svnweb.freebsd.org/changeset/ports/418745 Log: MFH: r418728 sysutils/*exfat*: update to 1.2.4 - Chase project move to GitHub - Chase patent licensing URL [1] - Restore GPLv2 after r328060 [2] - Fix build on DragonFly - Drop unused iconv dependency PR: 199874, 210823 PR: 210162 [1] Suggested by: decke, tijl [2] (via bug 193629) Approved by: maintainer timeout (2 weeks) Approved by: ports-secteam (feld) Changes: _U branches/2016Q3/ branches/2016Q3/sysutils/exfat-utils/Makefile branches/2016Q3/sysutils/exfat-utils/distinfo branches/2016Q3/sysutils/exfat-utils/files/patch-SConstruct branches/2016Q3/sysutils/exfat-utils/files/patch-libexfat_platform.h branches/2016Q3/sysutils/exfat-utils/files/patch-ublio branches/2016Q3/sysutils/exfat-utils/pkg-descr branches/2016Q3/sysutils/fusefs-exfat/Makefile branches/2016Q3/sysutils/fusefs-exfat/distinfo branches/2016Q3/sysutils/fusefs-exfat/files/patch-SConstruct branches/2016Q3/sysutils/fusefs-exfat/files/patch-libexfat_platform.h branches/2016Q3/sysutils/fusefs-exfat/files/patch-ublio branches/2016Q3/sysutils/fusefs-exfat/pkg-descr |