fuse3 support

Comments, questions, bug reports, etc.
Post Reply
Artoria2e5
Posts: 1
Joined: Sun Oct 13, 2019 7:47 am

fuse3 support

Post by Artoria2e5 »

I pieced together a patch for letting wimfs mount onto libfuse3 correctly. One of the advantages is that libfuse3 uses by default very large write chunks (1MiB); this helps with CPU utilization when writing. The other reason is that it's new and cool.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: fuse3 support

Post by synchronicity »

Thanks, this doesn't actually compile with libfuse3 though. First there is the error:

Code: Select all

In file included from /usr/include/fuse3/fuse.h:19,
                 from src/mount_image.c:46:
/usr/include/fuse3/fuse_common.h:802:4: error: #error only API version 30 or greater is supported
  802 | #  error only API version 30 or greater is supported
There are also errors due to the new code using variables that weren't declared, and due to other FUSE API changes.

Additional comments:

I think FUSE3 support should be controlled by a new configure argument --with-fuse3, so that packagers can choose whether they want fuse2 or fuse3 rather than being forced to fuse3 whenever it's installed. Keep in mind that fuse2 and fuse3 are normally installable alongside each other.

In inode_to_stbuf(), the unix_data fields are no longer actually being copied into the struct stat.

When the new code tries to clear the setuid and setgid bits, it accidentally also clears the file type bits.

The setuid and setgid bits aren't always cleared when a truncation is performed.

It doesn't make sense to clear the setuid and setgid bits on files that don't have UNIX data yet, since these bits are not in the default mode and such files should not be given UNIX data unless necessary.

Clearing the setuid and setgid bits should be done in a common helper function, e.g. "inode_remove_security()". The code shouldn't be duplicated in each place it's needed.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: fuse3 support

Post by synchronicity »

Hi,

This is an old thread, but I wanted to mention that wimlib has finally switched from fuse2 to fuse3.

(I decided to just drop fuse2 support entirely, rather than support both fuse2 and fuse3, since it's been several additional years.)
Post Reply