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 <linux-ext4@vger.kernel.org>, amir73il@gmail.com
Subject: [PULLBOMB v3 1.48] fuse4fs: drop libfuse2, add new server
Date: Thu, 9 Apr 2026 13:13:02 -0700	[thread overview]
Message-ID: <20260409201302.GD6192@frogsfrogsfrogs> (raw)

Hi Ted,

As promised during this morning's ext4 call, this large patchbomb
contains the remaining improvements that I'd like to make to fuse2fs
before integrating iomap.

The first pull request drops libfuse2 support from e2fsprogs.

The second pull request creates a new fuse ext* server (fuse4fs) which
uses the lowlevel FUSE API instead of the high level one.  The major
advantage of using the lowlevel API is that all file operations are
performed in terms of inodes instead of paths.  As a result, fuse4fs has
MUCH less overhead than fuse2fs because we avoid the overhead of having
libfuse translate inode numbers to paths only to have fuse2fs translate
paths back into inode numbers.

Obviously, this stuff should go into e2fsprogs 1.48, not a 1.47.x stable
release.  This patchbomb hasn't changed much since its last posting on
12 Mar 2026.  The range-diff between then and now is appended below;
there aren't really any changes other than the effects of rebasing
against today's next branch and adapting to using autoheader(1).

One curious thing: I saw in [1] that you applied my get_thread_id
change, but it isn't in -next yet.  These PRs might not merge properly.
Obviously it's no big deal for me to rebase and send new PRs.

--D

 -:  -------------- >  1:  91f5b6651553fe fuse2fs: bump library version
 1:  7e7bb349a384f7 =  2:  cf80ae2e89ba2f fuse2fs: wrap the fuse_set_feature_flag helper for older libfuse
 2:  631d3f8d14b613 =  3:  c7d947ac718bb4 fuse2fs: disable nfs exports
 3:  96ca2a29cc7dcb !  4:  c137760397ef66 fuse2fs: drop fuse 2.x support code
    @@ configure.ac: then
      	AC_DEFINE_UNQUOTED(FUSE_USE_VERSION, $FUSE_USE_VERSION,
      		[Define to the version of FUSE to use])
      fi
     
      ## misc/fuse2fs.c ##
     @@
    - #endif /* __SET_FOB_FOR_FUSE */
      #include <inttypes.h>
      #include "ext2fs/ext2fs.h"
      #include "ext2fs/ext2_fs.h"
      #include "ext2fs/ext2fsP.h"
      #include "support/bthread.h"
    + #include "support/thread.h"
     -#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
     -# define FUSE_PLATFORM_OPTS	""
     -#else
     -# ifdef __linux__
     -#  define FUSE_PLATFORM_OPTS	",use_ino,big_writes"
     -# else
 4:  e048f198d7b598 =  5:  239f4b7ac05b69 fuse2fs: separate libfuse3 and fuse2fs detection in configure
 5:  3b02fa292dda7c !  6:  1536edf8a93539 fuse2fs: start porting fuse2fs to lowlevel libfuse API
    @@ fuse4fs/fuse4fs.c (new)
     +#endif /* __SET_FOB_FOR_FUSE */
     +#include <inttypes.h>
     +#include "ext2fs/ext2fs.h"
     +#include "ext2fs/ext2_fs.h"
     +#include "ext2fs/ext2fsP.h"
     +#include "support/bthread.h"
    ++#include "support/thread.h"
     +
     +#include "../version.h"
     +#include "uuid/uuid.h"
     +#include "e2p/e2p.h"
     +
     +#ifdef ENABLE_NLS
    @@ fuse4fs/fuse4fs.c (new)
     +	m = b % align;
     +	return b - m;
     +}
     +
     +#define dbg_printf(fuse4fs, format, ...) \
     +	while ((fuse4fs)->debug) { \
    -+		printf("FUSE4FS (%s): tid=%d " format, (fuse4fs)->shortdev, gettid(), ##__VA_ARGS__); \
    ++		printf("FUSE4FS (%s): tid=%llu " format, (fuse4fs)->shortdev, get_thread_id(), ##__VA_ARGS__); \
     +		fflush(stdout); \
     +		break; \
     +	}
     +
     +#define log_printf(fuse4fs, format, ...) \
     +	do { \
    @@ fuse4fs/fuse4fs.c (new)
     +		ret = -EUCLEAN;
     +		break;
     +	case EIO:
     +#ifdef EILSEQ
     +	case EILSEQ:
     +#endif
    ++#if EUCLEAN != EIO
     +	case EUCLEAN:
    ++#endif
     +		/* these errnos usually denote corruption or persistence fail */
     +		is_err = 1;
     +		ret = -err;
     +		break;
     +	default:
     +		if (err < 256) {
    @@ fuse4fs/fuse4fs.c (new)
     +
     +	return ret;
     +}
     
      ## lib/config.h.in ##
     @@
    - /* Define to 1 if you have the BSD-style 'qsort_r' function. */
    - #undef HAVE_BSD_QSORT_R
    + /* Define to 1 if fuse supports cache_readdir */
    + #undef HAVE_FUSE_CACHE_READDIR
      
    - /* Define to 1 if PR_SET_IO_FLUSHER is present */
    - #undef HAVE_PR_SET_IO_FLUSHER
    + /* Define to 1 if you have the <fuse.h> header file. */
    + #undef HAVE_FUSE_H
      
     +/* Define to 1 if fuse supports lowlevel API */
     +#undef HAVE_FUSE_LOWLEVEL
     +
    - /* Define to 1 if you have the Mac OS X function
    -    CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
    - #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
    + /* Define to 1 if you have the 'futimes' function. */
    + #undef HAVE_FUTIMES
    + 
    + /* Define to 1 if you have the 'getcwd' function. */
    + #undef HAVE_GETCWD
      
    - /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
    -    the CoreFoundation framework. */
 6:  480ffd57c3152f =  7:  de29e11fda2d6b debian: create new package for fuse4fs
 7:  eb97e1fefbf286 =  8:  d4aa426efc0f3c fuse4fs: namespace some helpers
 8:  7a2e6084f203a4 =  9:  a53dd84ef7ce0c fuse4fs: convert to low level API
 9:  8072dafea5ba54 = 10:  37dafcc0894b89 libsupport: port the kernel list.h to libsupport
10:  df5e76db0018b3 ! 11:  30b3c80ed6bcc5 libsupport: add a cache
    @@ lib/support/xbitops.h (new)
     +#define rounddown_pow_of_two(n) __rounddown_pow_of_two(n)
     +
     +#endif
     
      ## lib/support/Makefile.in ##
     @@ lib/support/Makefile.in: OBJS=		bthread.o \
    - 		profile_helpers.o \
      		prof_err.o \
      		quotaio.o \
      		quotaio_v2.o \
      		quotaio_tree.o \
    + 		thread.o \
      		dict.o \
     -		devname.o
     +		devname.o \
     +		cache.o
      
      SRCS=		$(srcdir)/argv_parse.c \
      		$(srcdir)/bthread.c \
      		$(srcdir)/cstring.c \
      		$(srcdir)/mkquota.c \
      		$(srcdir)/parse_qtype.c \
     @@ lib/support/Makefile.in: SRCS=		$(srcdir)/argv_parse.c \
    - 		$(srcdir)/profile_helpers.c \
      		prof_err.c \
      		$(srcdir)/quotaio.c \
      		$(srcdir)/quotaio_tree.c \
      		$(srcdir)/quotaio_v2.c \
    + 		$(srcdir)/thread.c \
      		$(srcdir)/dict.c \
     -		$(srcdir)/devname.c
     +		$(srcdir)/devname.c \
     +		$(srcdir)/cache.c
      
      LIBRARY= libsupport
      LIBDIR= support
      
      @MAKEFILE_LIBRARY@
      @MAKEFILE_PROFILE@
     @@ lib/support/Makefile.in: quotaio_v2.o: $(srcdir)/quotaio_v2.c $(top_builddir)/lib/config.h \
    -  $(top_srcdir)/lib/ext2fs/bitops.h $(srcdir)/dqblk_v2.h \
    -  $(srcdir)/quotaio_tree.h
    + thread.o: $(srcdir)/thread.c $(top_builddir)/lib/config.h \
    +  $(top_builddir)/lib/dirpaths.h $(srcdir)/thread.h
      dict.o: $(srcdir)/dict.c $(top_builddir)/lib/config.h \
       $(top_builddir)/lib/dirpaths.h $(srcdir)/dict.h
      devname.o: $(srcdir)/devname.c $(top_builddir)/lib/config.h \
       $(top_builddir)/lib/dirpaths.h $(srcdir)/devname.h $(srcdir)/nls-enable.h
     +cache.o: $(srcdir)/cache.c $(top_builddir)/lib/config.h \
     + $(srcdir)/cache.h $(srcdir)/list.h $(srcdir)/xbitops.h
11:  f13414a72be32f = 12:  fb17b6521f0430 cache: disable debugging
12:  383f3dd0b56f64 = 13:  b6d5640bdf0086 cache: use modern list iterator macros
13:  a9c0181ee15128 = 14:  0be92e2d351193 cache: embed struct cache in the owner
14:  31e5763e32dfc2 = 15:  a486e89007fb55 cache: pass cache pointer to callbacks
15:  a5c773947bd56d = 16:  ae4911b183fa9d cache: pass a private data pointer through cache_walk
16:  4f017b4dc8920f = 17:  9c5af5b9d39a70 cache: add a helper to grab a new refcount for a cache_node
17:  d1dea709493fdc = 18:  c6ed3f93d43660 cache: return results of a cache flush
18:  e59f4eba2f22f8 = 19:  a13c635ef81b43 cache: add a "get only if incore" flag to cache_node_get
19:  a999b4c74344cd = 20:  cbd9dbc6943267 cache: support gradual expansion
20:  019aa0d8a8c87d = 21:  5d91f82ff155b9 cache: support updating maxcount and flags
21:  0283835cbfa2db = 22:  7134be34c002f5 cache: support channging flags
22:  0f5c83c6c88c3f = 23:  2a8ddebbfa9298 cache: implement automatic shrinking
23:  26f78774c08acc ! 24:  dd17627e00495e fuse4fs: add cache to track open files
    @@ fuse4fs/fuse4fs.c
      #ifdef __SET_FOB_FOR_FUSE
      # error Do not set magic value __SET_FOB_FOR_FUSE!!!!
      #endif
      #ifndef _FILE_OFFSET_BITS
      /*
     @@
    - #endif /* __SET_FOB_FOR_FUSE */
      #include <inttypes.h>
      #include "ext2fs/ext2fs.h"
      #include "ext2fs/ext2_fs.h"
      #include "ext2fs/ext2fsP.h"
      #include "support/bthread.h"
    + #include "support/thread.h"
     +#include "support/list.h"
     +#include "support/cache.h"
      
      #include "../version.h"
      #include "uuid/uuid.h"
      #include "e2p/e2p.h"
24:  d6a2e3be991671 = 25:  2ea53b826253b6 fuse4fs: use the orphaned inode list
25:  2a4c9c2e579556 = 26:  6bd1919297a22f fuse4fs: implement FUSE_TMPFILE
26:  38cd25631692e6 = 27:  951a10258cada0 fuse4fs: create incore reverse orphan list

             reply	other threads:[~2026-04-09 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 20:13 Darrick J. Wong [this message]
2026-04-09 20:14 ` [GIT PULL 1/2] fuse2fs: upgrade to libfuse 3.17 Darrick J. Wong
2026-04-09 20:15 ` [GIT PULL 2/2] fuse4fs: fork a low level fuse server Darrick J. Wong

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=20260409201302.GD6192@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=amir73il@gmail.com \
    --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