Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken on NetBSD 10.0 #197

Open
guijan opened this issue Sep 17, 2024 · 0 comments
Open

Broken on NetBSD 10.0 #197

guijan opened this issue Sep 17, 2024 · 0 comments

Comments

@guijan
Copy link

guijan commented Sep 17, 2024

After successfully compiling 0b41c6d unmodified:

# fuse/mount.exfat-fuse /dev/dk0 /mnt
fuse/mount.exfat-fuse: Shared object "libfuse.so.2" not found

It can be worked around with LD_PRELOAD, which throws some errors but does mount the filesystem:

# LD_PRELOAD=/usr/pkg/lib/libfuse.so.2 fuse/mount.exfat-fuse /dev/dk0 /mnt
mount.exfat-fuse: perfuse_open: setsockopt SO_SNDBUF to 2162688 failed: No buffer space available
mount.exfat-fuse: perfuse_open: setsockopt SO_RCVBUF to 2162688 failed: No buffer space available
mount.exfat-fuse: perfuse_open: setsockopt SO_SNDBUF to 2162688 failed: No buffer space available
mount.exfat-fuse: perfuse_open: setsockopt SO_RCVBUF to 2162688 failed: No buffer space available
mount.exfat-fuse: perfuse_open: setsockopt SO_SNDBUF to 2162688 failed: No buffer space available
mount.exfat-fuse: perfuse_open: setsockopt SO_RCVBUF to 2162688 failed: No buffer space available

After mounting the filesystem like this, it works a little, but writing with block sizes larger than 8191 bytes causes mount.exfat-fuse to error and exit.

Mounting again with the -d flag like this:

# LD_PRELOAD=/usr/pkg/lib/libfuse.so.2 fuse/mount.exfat-fuse -d /dev/dk0 /mnt

And writing a single 8191 (1 byte short of 8KiB) block with dd succeeds:

# dd if=/dev/zero of=/mnt/test bs=8191 count=1
1+0 records in
1+0 records out
8191 bytes transferred in 5.255 secs (1558 bytes/sec)

And mount.exfat-fuse produces the following output:

unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 4950
LOOKUP /test
getattr /test
   NODEID: 2
   unique: 1, success, outsize: 144
unique: 2, opcode: SETATTR (4), nodeid: 2, insize: 128, pid: 4950
truncate /test 0
getattr /test
   unique: 2, success, outsize: 120
unique: 3, opcode: OPEN (14), nodeid: 2, insize: 48, pid: 4950
open flags: 0x402 /test
   open[4256039552] flags: 0x402 /test
   unique: 3, success, outsize: 32
unique: 4, opcode: SETATTR (4), nodeid: 2, insize: 128, pid: 4950
truncate /test 8191
getattr /test
   unique: 4, success, outsize: 120
unique: 6, opcode: WRITE (16), nodeid: 2, insize: 4176, pid: 4950
writepage[4256039552] 4096 bytes to 0 flags: 0x1
   writepage[4256039552] 4096 bytes to 0
   unique: 6, success, outsize: 24
unique: 7, opcode: WRITE (16), nodeid: 2, insize: 4175, pid: 4950
write[4256039552] 4095 bytes to 4096 flags: 0x1
   write[4256039552] 4095 bytes to 4096
   unique: 7, success, outsize: 24
unique: 8, opcode: FSYNC (20), nodeid: 2, insize: 56, pid: 4950
fsync[4256039552] datasync: 1
   unique: 8, success, outsize: 16
unique: 9, opcode: RELEASE (18), nodeid: 2, insize: 64, pid: 4950
release[4256039552] flags: 0x0
   unique: 9, success, outsize: 16

However, writing an 8KiB or larger block succeeds on the application side:

# dd if=/dev/zero of=/mnt/test bs=8k count=1
1+0 records in
1+0 records out
8192 bytes transferred in 0.376 secs (21787 bytes/sec)

But causes mount.exfat-fuse to error and exit:

unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 4427
LOOKUP /test
getattr /test
   NODEID: 2
   unique: 1, success, outsize: 144
unique: 2, opcode: SETATTR (4), nodeid: 2, insize: 128, pid: 4427
truncate /test 0
getattr /test
   unique: 2, success, outsize: 120
unique: 3, opcode: OPEN (14), nodeid: 2, insize: 48, pid: 4427
open flags: 0x402 /test
   open[4256039552] flags: 0x402 /test
   unique: 3, success, outsize: 32
unique: 4, opcode: SETATTR (4), nodeid: 2, insize: 128, pid: 4427
truncate /test 8192
getattr /test
   unique: 4, success, outsize: 120
perfused: perfused_writeframe: send returned -1, errno = 2: No such file or directory
xchg_pb failed: No such file or directoryshort read on fuse device
fuse: failed to unmount /mnt: Invalid argument
WARN: non-zero reference counter (1) for 'test'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant