* [PATCHSET 3/3] xfsprogs: enable metadir by default
@ 2026-10-09 23:45 Darrick J. Wong
2026-10-09 23:53 ` [PATCH 1/3] tools: add a new script to generate fixes tags Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Darrick J. Wong @ 2026-10-09 23:45 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
Hi all,
Metadata directory trees were added to the codebase two years ago, and
we dropped the EXPERIMENTAL tag almost a year ago. We haven't gotten
any serious complaints about it in that year, so let's turn it on by
default.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=enable-metadir
---
Commits in this patchset:
* tools: add a new script to generate fixes tags
* mkfs: add config file for the 2026 LTS kernel
* mkfs: enable metadata directory trees by default
---
man/man8/mkfs.xfs.8.in | 6 ++++-
mkfs/Makefile | 3 ++
mkfs/lts_7.3.conf | 29 +++++++++++++++++++++++
mkfs/xfs_mkfs.c | 1 +
tools/git-fixes | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 98 insertions(+), 2 deletions(-)
create mode 100644 mkfs/lts_7.3.conf
create mode 100755 tools/git-fixes
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] tools: add a new script to generate fixes tags
2026-10-09 23:45 [PATCHSET 3/3] xfsprogs: enable metadir by default Darrick J. Wong
@ 2026-10-09 23:53 ` Darrick J. Wong
2026-10-19 8:12 ` Andrey Albershteyn
2026-10-09 23:53 ` [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel Darrick J. Wong
2026-10-09 23:53 ` [PATCH 3/3] mkfs: enable metadata directory trees by default Darrick J. Wong
2 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2026-10-09 23:53 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Add a program that can generate Fixes: tags for a new bugfix commit to
cite an older buggy commit.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tools/git-fixes | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100755 tools/git-fixes
diff --git a/tools/git-fixes b/tools/git-fixes
new file mode 100755
index 00000000000000..5729de462e7183
--- /dev/null
+++ b/tools/git-fixes
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Copyright (c) 2026 Oracle. All Rights Reserved.
+# Author: Darrick J. Wong <djwong@kernel.org>
+
+# Cite a list of git hashes in Fixes: tag format.
+
+if [ -z "$1" ] || [ "$1" = "--help" ]; then
+ echo "Usage: $0 commit [commits...]"
+ exit 1
+fi
+
+stable_email="$(git config user.stableSubmissionTarget)"
+
+# Find the most recent version tag for this commit. Assumes that version tags
+# start with v and a digit.
+tag_for_commit() {
+ local arg="$1"
+ local tag
+ local release_tag
+ local rc_suffix
+ local version_prefix
+
+ # Find the first tag created after this commit.
+ version_prefix="$(git config versionsort.prefix)"
+ test -z "${version_prefix}" && version_prefix="v"
+ tag="$(git tag -l --contains "${arg}" --sort version:refname | \
+ grep "^${version_prefix}[0-9]" | \
+ head -n 1)"
+ test -z "${tag}" && return 1
+
+ # Strip off any version suffix (presumably "-rcX") to construct what
+ # ought to be the tag name for the final release.
+ rc_suffix="$(git config versionsort.suffix)"
+ # shellcheck disable=SC2001
+ release_tag="$(echo "${tag}" | sed -e "s/${rc_suffix}.*//g")"
+
+ # If the release tag actually exists, print that instead of the first
+ # tag. Otherwise, print that first tag. We'd rather print "v5.4" than
+ # the more accurate "v5.4-rc1" because stable backports target
+ # releases, not -rcX.
+ if [ -n "$(git tag -l "${release_tag}" 2>/dev/null)" ]; then
+ echo "${release_tag}"
+ else
+ echo "${tag}"
+ fi
+ return 0
+}
+
+gitcc=(git log --format='Cc: <%aE>')
+gitfixes=(git log --format='Fixes: %h ("%s")')
+for arg in "$@"; do
+ "${gitcc[@]}" "${arg}^1..${arg}"
+ if [ -n "${stable_email}" ]; then
+ fixed_in="$(tag_for_commit "${arg}")" && \
+ echo "Cc: <${stable_email}> # ${fixed_in}"
+ fi
+ "${gitfixes[@]}" "${arg}^1..${arg}"
+done
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel
2026-10-09 23:45 [PATCHSET 3/3] xfsprogs: enable metadir by default Darrick J. Wong
2026-10-09 23:53 ` [PATCH 1/3] tools: add a new script to generate fixes tags Darrick J. Wong
@ 2026-10-09 23:53 ` Darrick J. Wong
2026-10-19 8:13 ` Andrey Albershteyn
2026-10-09 23:53 ` [PATCH 3/3] mkfs: enable metadata directory trees by default Darrick J. Wong
2 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2026-10-09 23:53 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Add a config file for 7.3 since it'll be the LTS.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
mkfs/Makefile | 3 ++-
mkfs/lts_7.3.conf | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 mkfs/lts_7.3.conf
diff --git a/mkfs/Makefile b/mkfs/Makefile
index 16793bdb1e03e3..b2d99e620c78c4 100644
--- a/mkfs/Makefile
+++ b/mkfs/Makefile
@@ -19,7 +19,8 @@ CFGFILES = \
lts_6.1.conf \
lts_6.6.conf \
lts_6.12.conf \
- lts_6.18.conf
+ lts_6.18.conf \
+ lts_7.3.conf
LLDLIBS += $(LIBXFS) $(LIBXCMD) $(LIBFROG) $(LIBRT) $(LIBBLKID) \
$(LIBUUID) $(LIBINIH) $(LIBURCU) $(LIBPTHREAD)
diff --git a/mkfs/lts_7.3.conf b/mkfs/lts_7.3.conf
new file mode 100644
index 00000000000000..16d1c40e8f8a88
--- /dev/null
+++ b/mkfs/lts_7.3.conf
@@ -0,0 +1,29 @@
+# V5 features that were the mkfs defaults when the upstream Linux 7.3 LTS
+# kernel was released at the end of 2026.
+[block]
+
+[metadata]
+crc=1
+finobt=1
+rmapbt=1
+reflink=1
+inobtcount=1
+bigtime=1
+metadir=0
+autofsck=repair
+
+[data]
+
+[inode]
+sparse=1
+nrext64=1
+exchange=1
+
+[log]
+
+[naming]
+parent=1
+ftype=1
+version=2
+
+[realtime]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] mkfs: enable metadata directory trees by default
2026-10-09 23:45 [PATCHSET 3/3] xfsprogs: enable metadir by default Darrick J. Wong
2026-10-09 23:53 ` [PATCH 1/3] tools: add a new script to generate fixes tags Darrick J. Wong
2026-10-09 23:53 ` [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel Darrick J. Wong
@ 2026-10-09 23:53 ` Darrick J. Wong
2026-10-19 8:13 ` Andrey Albershteyn
2 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2026-10-09 23:53 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Metadata directory trees were added to XFS in Linux 6.13 at the end of
2024. It's now been two years and we haven't found any significant
problems, so enable it by default. Sysadmins will now be able to have
persistent quota options instead of having to encode that in fstab.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
man/man8/mkfs.xfs.8.in | 6 +++++-
mkfs/lts_7.3.conf | 2 +-
mkfs/xfs_mkfs.c | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/man/man8/mkfs.xfs.8.in b/man/man8/mkfs.xfs.8.in
index 927cd075bf8a5d..ed5b0b45149dd1 100644
--- a/man/man8/mkfs.xfs.8.in
+++ b/man/man8/mkfs.xfs.8.in
@@ -303,10 +303,14 @@ .SH OPTIONS
.TP
.BI metadir= value
This option creates an internal directory tree to store filesystem metadata.
+The value is either 0 to disable the feature, or 1 to create the internal
+directory tree.
+If enabled, quota mount options are persisted across mounts without the need
+for respecifying them.
.IP
By default,
.B mkfs.xfs
-will not enable this feature.
+will enable this feature.
If the option
.B \-m crc=0
is used, the metadata directory feature is not supported and is disabled.
diff --git a/mkfs/lts_7.3.conf b/mkfs/lts_7.3.conf
index 16d1c40e8f8a88..13a2bd33c99068 100644
--- a/mkfs/lts_7.3.conf
+++ b/mkfs/lts_7.3.conf
@@ -9,7 +9,7 @@
reflink=1
inobtcount=1
bigtime=1
-metadir=0
+metadir=1
autofsck=repair
[data]
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 10fc00c2251b7c..3fc113a07a0c0c 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -6145,6 +6145,7 @@ main(
.bigtime = true,
.nrext64 = true,
.exchrange = true,
+ .metadir = true,
/*
* When we decide to enable a new feature by default,
* please remember to update the mkfs conf files.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] tools: add a new script to generate fixes tags
2026-10-09 23:53 ` [PATCH 1/3] tools: add a new script to generate fixes tags Darrick J. Wong
@ 2026-10-19 8:12 ` Andrey Albershteyn
2026-10-19 15:54 ` Darrick J. Wong
0 siblings, 1 reply; 8+ messages in thread
From: Andrey Albershteyn @ 2026-10-19 8:12 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs
On 2026-10-09 16:53:10, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Add a program that can generate Fixes: tags for a new bugfix commit to
> cite an older buggy commit.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> tools/git-fixes | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
> create mode 100755 tools/git-fixes
>
>
> diff --git a/tools/git-fixes b/tools/git-fixes
> new file mode 100755
> index 00000000000000..5729de462e7183
> --- /dev/null
> +++ b/tools/git-fixes
> @@ -0,0 +1,61 @@
> +#!/bin/bash
> +
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +# Copyright (c) 2026 Oracle. All Rights Reserved.
> +# Author: Darrick J. Wong <djwong@kernel.org>
> +
> +# Cite a list of git hashes in Fixes: tag format.
> +
> +if [ -z "$1" ] || [ "$1" = "--help" ]; then
> + echo "Usage: $0 commit [commits...]"
> + exit 1
> +fi
I miss a bit more description on the use of this, so, the output of
this script is Fixes: for the first <commit> description and the
rest [commits...] are targets to be in Fixes:?
Also, would be nice to see user.stableSubmissionTarget and
versionsort.suffix mentioned in the description above
--
- Andrey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel
2026-10-09 23:53 ` [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel Darrick J. Wong
@ 2026-10-19 8:13 ` Andrey Albershteyn
0 siblings, 0 replies; 8+ messages in thread
From: Andrey Albershteyn @ 2026-10-19 8:13 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs
On 2026-10-09 16:53:26, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Add a config file for 7.3 since it'll be the LTS.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
--
- Andrey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] mkfs: enable metadata directory trees by default
2026-10-09 23:53 ` [PATCH 3/3] mkfs: enable metadata directory trees by default Darrick J. Wong
@ 2026-10-19 8:13 ` Andrey Albershteyn
0 siblings, 0 replies; 8+ messages in thread
From: Andrey Albershteyn @ 2026-10-19 8:13 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs
On 2026-10-09 16:53:42, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Metadata directory trees were added to XFS in Linux 6.13 at the end of
> 2024. It's now been two years and we haven't found any significant
> problems, so enable it by default. Sysadmins will now be able to have
> persistent quota options instead of having to encode that in fstab.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
--
- Andrey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] tools: add a new script to generate fixes tags
2026-10-19 8:12 ` Andrey Albershteyn
@ 2026-10-19 15:54 ` Darrick J. Wong
0 siblings, 0 replies; 8+ messages in thread
From: Darrick J. Wong @ 2026-10-19 15:54 UTC (permalink / raw)
To: Andrey Albershteyn; +Cc: linux-xfs
On Mon, Oct 19, 2026 at 10:12:42AM +0200, Andrey Albershteyn wrote:
> On 2026-10-09 16:53:10, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Add a program that can generate Fixes: tags for a new bugfix commit to
> > cite an older buggy commit.
> >
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > ---
> > tools/git-fixes | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 61 insertions(+)
> > create mode 100755 tools/git-fixes
> >
> >
> > diff --git a/tools/git-fixes b/tools/git-fixes
> > new file mode 100755
> > index 00000000000000..5729de462e7183
> > --- /dev/null
> > +++ b/tools/git-fixes
> > @@ -0,0 +1,61 @@
> > +#!/bin/bash
> > +
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +
> > +# Copyright (c) 2026 Oracle. All Rights Reserved.
> > +# Author: Darrick J. Wong <djwong@kernel.org>
> > +
> > +# Cite a list of git hashes in Fixes: tag format.
> > +
> > +if [ -z "$1" ] || [ "$1" = "--help" ]; then
> > + echo "Usage: $0 commit [commits...]"
> > + exit 1
> > +fi
>
> I miss a bit more description on the use of this, so, the output of
> this script is Fixes: for the first <commit> description and the
> rest [commits...] are targets to be in Fixes:?
No, each @commit specified gets its own Fixes tag:
$ git fixes 8293528fb1899a d0b6cb4fbea7b1 116961aa98bea1
Cc: <mason@kernel.org>
Fixes: 8293528fb1899a ("xfs: keep FICLONERANGE from overwriting the source")
Cc: <djwong@kernel.org>
Fixes: d0b6cb4fbea7b1 ("xfs: refactor inode forkoff to byte conversions")
Cc: <djwong@kernel.org>
Fixes: 116961aa98bea1 ("xfs: drop unnecessary sr parameter from xchk_rtgroup init functions")
Generally you'd only pass in a single commit, but there's no reason not
to keep going, IMO.
> Also, would be nice to see user.stableSubmissionTarget and
> versionsort.suffix mentioned in the description above
I'll add a description of user.stableSubmisionTaret. versionsort.suffix
is part of standard git; see git-config(1).
--D
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-19 15:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 23:45 [PATCHSET 3/3] xfsprogs: enable metadir by default Darrick J. Wong
2026-10-09 23:53 ` [PATCH 1/3] tools: add a new script to generate fixes tags Darrick J. Wong
2026-10-19 8:12 ` Andrey Albershteyn
2026-10-19 15:54 ` Darrick J. Wong
2026-10-09 23:53 ` [PATCH 2/3] mkfs: add config file for the 2026 LTS kernel Darrick J. Wong
2026-10-19 8:13 ` Andrey Albershteyn
2026-10-09 23:53 ` [PATCH 3/3] mkfs: enable metadata directory trees by default Darrick J. Wong
2026-10-19 8:13 ` Andrey Albershteyn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.