From: "Theodore Tso" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [GIT PULL 3/4] fuse2fs: improve block and inode caching
Date: Tue, 22 Sep 2026 22:00:57 -0400 [thread overview]
Message-ID: <arMoQq1vyhPnHyiZ@mit.edu> (raw)
In-Reply-To: <178919524496.1033422.16170817413025710050.stg-ugh@frogsfrogsfrogs>
On Fri, Sep 11, 2026 at 11:42:15PM -0500, Darrick J. Wong wrote:
>
> This series ports the libext2fs inode cache to the new cache.c hashtable
> code that was added for fuse4fs unlinked file support and improves on
> the UNIX I/O manager's block cache by adding a new I/O manager that does
> its own caching. Now we no longer have statically sized buffer caching
> for the two fuse servers.
The problem is that cache.c is in lib/support, and my long-standing
rule is that the interface of lib/support is not guaranteed to be
stable, and hence libsupport.a is *not* built as a shared library.
For this reason, we can't allow libext2fs to link against
libsupport.a. If we do, then the interfaces in libsupport.a will leak
into the libext2fs namespace. This means that applications that link
against libext2fs might accidentally use it.
If we ever change a function in libsupport, and it's also in
libext2fs, then a binary which links against the newer version of the
function in libsupport.a, but then the binary happens to use
libext2fs.so.2 with the older version of that function.... well,
hilarity can ensue. (Especially with Linux's ELF shared library,
things are OK with AIX shared library and how it handles shared
library linking, but that's another story.)
So there are a couple of ways we can handle this.
1) We could #include cache.c with some kind of #define hack to make
all of the functions marked to be static.
2). We could move cache.c to lib/ext2fs and rename all of the
functions to something like _libext2fs_cache_xxx (to avoid namespace
collisions), or if we think we are happy publishing it as a public,
stable interface that is used by fuse4fs, we could use
libext2fs_cache_xxx.
What do you think?
- Ted
next prev parent reply other threads:[~2026-09-23 2:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 6:42 [GIT PULL 3/4] fuse2fs: improve block and inode caching Darrick J. Wong
2026-09-23 2:00 ` Theodore Tso [this message]
2026-09-23 5:11 ` 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=arMoQq1vyhPnHyiZ@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@kernel.org \
--cc=linux-ext4@vger.kernel.org \
/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