From: "Theodore Tso" <tytso@mit.edu>
To: Baokun Li <libaokun@linux.alibaba.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
fstests@vger.kernel.org, zlang@kernel.org,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
sandeen@redhat.com, dgc@kernel.org
Subject: Re: [PATCH] generic/492: bypass the blkid cache when probing the label
Date: Wed, 23 Sep 2026 22:25:03 -0400 [thread overview]
Message-ID: <arRIECW5MBX7fwfe@mit.edu> (raw)
In-Reply-To: <8cc9f978-6365-4898-b3db-9f0b232aeb4c@linux.alibaba.com>
On Wed, Sep 23, 2026 at 06:02:38PM -0500, Baokun Li wrote:
> >> ./configure --disable-libblkid --disable-fsck \
> >> --disable-libuuid --disable-uuidd
> > This works, but this wll also disable those e2fsprogs features that
> > require those libraries. So mke2fs will not generate UUID's in the
> > superblock, e2fsck won't handle LABEL=xyzzy specifiers, etc.
> > Fortunately xfstests don't depend on these featuers, so this will work.
>
> Hmm, what I disabled is exactly the set duplicated by util-linux:
> the blkid/uuid libs and UUID/LABEL= handling all live there, so
> the tools just link the system ones -- there is no functional loss.
The fact that you needed the --disable options implies that e2fsprogs
wasn't able to use the util-linux supplied libraries. If the
configure script determines libblkid and libuuid are available for
linking against, (e.g., libblkid-dev and uuid-dev are installed), the
built-in libblkid and libuuid file systems are disabled.
From the configure script output:
checking for blkid_get_cache in -lblkid... yes
Using system blkid library by default
checking for uuid_generate in -luuid... yes
Using system uuid by default
Disabling uuidd by default
In contrast, if you run the configure script on MacOS, NetBSD, or a
Linux system missing the libuuid / libblkid development files, you
will see:
checking for uuid_generate in -luuid... no
Enabling private uuid library by default
Building uuidd by default
> Also, a thought that just came up: on the blkid side, would it be
> feasible to not trust the cache for mounted devices and always
> re-probe? The mount / set label / umount / get label (within 2s)
> window would remain, but it would be much smaller.
Maybe. It's not clear how often people might be trying to query the
blkid data. Also, figuring out whether or not a device is mounted is
not free. That would mean that for every blkid query, it would have
to read /proc/mounts to make that determination. And note that on
some data center servers, there could potentially be hundreds if not
thousands of entries in /proc/mounts, either because you have a huge
number of bind mounts or overlayfs, and/or because you might have a
huge number of read-only iscsi mounts to deliver software packages to
your container based Borg or Kubernetes jobs.
I suppose you could put in the blkid cache a hint as to whether the
file system is mounted, but that in itself could get stale and out of
date.
Cheers,
- Ted
next prev parent reply other threads:[~2026-09-24 2:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 9:41 [PATCH] generic/492: bypass the blkid cache when probing the label Baokun Li
2026-09-21 5:27 ` Darrick J. Wong
2026-09-21 9:07 ` Baokun Li
2026-09-21 23:49 ` Darrick J. Wong
2026-09-22 3:43 ` Theodore Tso
2026-09-22 7:17 ` Baokun Li
2026-09-22 14:53 ` Darrick J. Wong
2026-09-23 9:13 ` Baokun Li
2026-09-22 15:56 ` Theodore Tso
2026-09-23 10:02 ` Baokun Li
2026-09-24 2:25 ` Theodore Tso [this message]
2026-09-24 8:09 ` Baokun Li
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=arRIECW5MBX7fwfe@mit.edu \
--to=tytso@mit.edu \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=zlang@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