public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCHSET 1/6] fuse2fs: even more bug fixes
Date: Wed, 28 May 2025 18:37:13 -0700	[thread overview]
Message-ID: <20250529013713.GA8282@frogsfrogsfrogs> (raw)
In-Reply-To: <20250523140344.GA1414791@mit.edu>

On Fri, May 23, 2025 at 10:03:44AM -0400, Theodore Ts'o wrote:
> On Wed, May 21, 2025 at 03:34:36PM -0700, Darrick J. Wong wrote:
> > Hi all,
> > 
> > This series fixes even more bugs in fuse2fs.
> 
> Thanks, applied.  I found that it didn't compile, because it used
> fuse2fs_{read,write}_inode() which doesn't get defined until PATCHSET
> 2/6.  So I've also applied the second patchset, and then split the
> patch "fuse2fs: simplify reading and writing inodes" into two commits,
> and applied the first half before "fuse2fs: fix removing ea inodes when
> freeing a file" to keep the fuse2fs changes bisectable.
> 
> Also, I cleaned up some patches to keep fuse2fs portable enough to
> work with MacOS.  I've lightly tested fuse2fs with MacFuse (installed
> via MacPorts) on macOS Sequoia and it works without having to pay $$$
> to Apple.  You do need to enable the MacFuse system extension (which
> is signed by Benjamin Fleischer, so I guess Fleischer is the one who
> paid $3000 to Apple) and reboot, but it does work.
> 
> I'll reach out to someone in FreeBSD land to test whether fuse2fs
> works there, since I'd like to maintain cross-OS portability as much
> as possible.

Hrmm.  A question I've been pondering for a couple of weeks is whether
or not fuse2fs-iomap should actually care about cross-OS portability.
The further I wander into the two layers of libfuse, the more I realize
that the low level fuse library is for fuse servers that want to tie
themselves to Linux (e.g. you can implement statx and copy_file_range)
and the high level library, which seems to be maintaining compatibility
with the osx/bsd variants.

At this point I don't know if one can actually /create/ a hybrid fuse
server that talks to both layers (layering violation!!) since the upper
level hides the guts of the low level library.  If you've looked at the
fuse2fs iomap code, you'll notice that I've passed the Linux fuse
driver's nodeid (aka the iget number) all the way up to fuse2fs along
with the ext2 ino number which is basically a u64 cookie that gets
passed along with the nodeid.

If the Linux fuse driver maintainers accept the fuse-iomap code then
maybe it would make sense to fork fuse2fs: one for general compatibility
across filesystems, and second one optimized for Linux.

> It does mean that I'm a bit concerned about the fuseblk
> patchset because I'm pretty sure that's Linux-specific, correct?

That's a good question.  libfuse says that fuse_operations::bmap only
makes sense for filesystems mounted with the "blkdev" option (which is
what turns on fuseblk mode) and doesn't #ifdef it away on any platforms.
libfuse itself seems to be built on freebsd, but then ...

Looking through what I think is the mount option parsing code in
fuse_vfsop_mount, I don't think they support a blkdev= option?
https://raw.githubusercontent.com/freebsd/freebsd-src/refs/heads/main/sys/fs/fuse/fuse_vfsops.c

So maybe it's not supported on !linux.  Unfortunately, it's not easy to
tell from the one other fuseblk server I know of (ntfs-3g) if they even
try to use fuseblk mode on freebsd because of course they vendored
libfuse into their own source code(!)

Will have a closer look tomorrow.  At worst we can always wrap it in
more #ifdef __LINUX__ magic.

--D

> Cheers,
> 
> 						- Ted
> 

      reply	other threads:[~2025-05-29  1:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 22:34 [PATCHSET 1/6] fuse2fs: even more bug fixes Darrick J. Wong
2025-05-21 22:35 ` [PATCH 01/29] libext2fs: fix unix io manager invalidation Darrick J. Wong
2025-05-21 22:35 ` [PATCH 02/29] libext2fs: fix livelock in the unix io manager Darrick J. Wong
2025-05-21 22:35 ` [PATCH 03/29] fuse2fs: clean up error messages Darrick J. Wong
2025-05-21 22:35 ` [PATCH 04/29] fuse2fs: fix cache size parsing Darrick J. Wong
2025-05-21 22:36 ` [PATCH 05/29] fuse2fs: compact all the boolean flags in struct fuse2fs Darrick J. Wong
2025-05-21 22:36 ` [PATCH 06/29] fuse2fs: support XATTR_CREATE/REPLACE in setxattr Darrick J. Wong
2025-05-21 22:36 ` [PATCH 07/29] fuse2fs: fix error return handling in op_truncate Darrick J. Wong
2025-05-21 22:37 ` [PATCH 08/29] fuse2fs: flip parameter order in __translate_error Darrick J. Wong
2025-05-21 22:37 ` [PATCH 09/29] fuse2fs: fix CLI argument parsing leaks Darrick J. Wong
2025-05-21 22:37 ` [PATCH 10/29] fuse2fs: allow some control over acls Darrick J. Wong
2025-05-21 22:37 ` [PATCH 11/29] fuse2fs: enable processing of acls in the kernel Darrick J. Wong
2025-05-21 22:38 ` [PATCH 12/29] fuse2fs: make removexattr work correctly Darrick J. Wong
2025-05-21 22:38 ` [PATCH 13/29] fuse2fs: implement O_TRUNC correctly Darrick J. Wong
2025-05-21 22:38 ` [PATCH 14/29] fuse2fs: rearrange check_inum_access parameters a bit Darrick J. Wong
2025-05-21 22:38 ` [PATCH 15/29] fuse2fs: make filesystem corruption a hard error Darrick J. Wong
2025-05-21 22:39 ` [PATCH 16/29] fuse2fs: make internal state " Darrick J. Wong
2025-05-21 22:39 ` [PATCH 17/29] fuse2fs: make bad magic numbers report a corruption error too Darrick J. Wong
2025-05-21 22:39 ` [PATCH 18/29] fuse2fs: return EPERM for write access to EXT2_IMMUTABLE_FL files Darrick J. Wong
2025-05-21 22:39 ` [PATCH 19/29] fuse2fs: check the immutable flag in more places Darrick J. Wong
2025-05-21 22:40 ` [PATCH 20/29] fuse2fs: implement O_APPEND correctly Darrick J. Wong
2025-05-21 22:40 ` [PATCH 21/29] fuse2fs: decode fuse_main error codes Darrick J. Wong
2025-05-21 22:40 ` [PATCH 22/29] fuse2fs: fix fallocate zero range Darrick J. Wong
2025-05-21 22:40 ` [PATCH 23/29] fuse2fs: check for supported xattr name prefixes Darrick J. Wong
2025-05-21 22:41 ` [PATCH 24/29] fuse2fs: fix return value handling Darrick J. Wong
2025-05-21 22:41 ` [PATCH 25/29] fuse2fs: fix removing ea inodes when freeing a file Darrick J. Wong
2025-05-21 22:41 ` [PATCH 26/29] fuse2fs: fix post-EOF preallocation clearing on truncation Darrick J. Wong
2025-05-21 22:41 ` [PATCH 27/29] fuse2fs: also ignore the nodelalloc mount option Darrick J. Wong
2025-05-21 22:42 ` [PATCH 28/29] fuse2fs: propagate default ACLs to new children Darrick J. Wong
2025-05-21 22:42 ` [PATCH 29/29] fuse2fs: fix group membership checking in op_chmod Darrick J. Wong
2025-05-23 14:03 ` [PATCHSET 1/6] fuse2fs: even more bug fixes Theodore Ts'o
2025-05-29  1:37   ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250529013713.GA8282@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox