Commit e90dcba0 authored by Carlos Maiolino's avatar Carlos Maiolino
Browse files

Merge tag 'kconfig-2025-changes_2025-09-05' of...

Merge tag 'kconfig-2025-changes_2025-09-05' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux

 into xfs-6.18-merge

xfs: kconfig and feature changes for 2025 LTS [6.18 v2 2/2]

Ahead of the 2025 LTS kernel, disable by default the two features that
we promised to turn off in September 2025: V4 filesystems, and the
long-broken ASCII case insensitive directories.

Since online fsck has not had any major issues in the 16 months since it
was merged upstream, let's also turn that on by default.

With a bit of luck, this should all go splendidly.

Signed-off-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parents 482c5780 0ff51a1f
Loading
Loading
Loading
Loading
+8 −49
Original line number Diff line number Diff line
@@ -34,22 +34,6 @@ When mounting an XFS filesystem, the following options are accepted.
	to the file. Specifying a fixed ``allocsize`` value turns off
	the dynamic behaviour.

  attr2 or noattr2
	The options enable/disable an "opportunistic" improvement to
	be made in the way inline extended attributes are stored
	on-disk.  When the new form is used for the first time when
	``attr2`` is selected (either when setting or removing extended
	attributes) the on-disk superblock feature bit field will be
	updated to reflect this format being in use.

	The default behaviour is determined by the on-disk feature
	bit indicating that ``attr2`` behaviour is active. If either
	mount option is set, then that becomes the new default used
	by the filesystem.

	CRC enabled filesystems always use the ``attr2`` format, and so
	will reject the ``noattr2`` mount option if it is set.

  discard or nodiscard (default)
	Enable/disable the issuing of commands to let the block
	device reclaim space freed by the filesystem.  This is
@@ -75,12 +59,6 @@ When mounting an XFS filesystem, the following options are accepted.
	across the entire filesystem rather than just on directories
	configured to use it.

  ikeep or noikeep (default)
	When ``ikeep`` is specified, XFS does not delete empty inode
	clusters and keeps them around on disk.  When ``noikeep`` is
	specified, empty inode clusters are returned to the free
	space pool.

  inode32 or inode64 (default)
	When ``inode32`` is specified, it indicates that XFS limits
	inode creation to locations which will not result in inode
@@ -253,9 +231,8 @@ latest version and try again.

The deprecation will take place in two parts.  Support for mounting V4
filesystems can now be disabled at kernel build time via Kconfig option.
The option will default to yes until September 2025, at which time it
will be changed to default to no.  In September 2030, support will be
removed from the codebase entirely.
These options were changed to default to no in September 2025.  In
September 2030, support will be removed from the codebase entirely.

Note: Distributors may choose to withdraw V4 format support earlier than
the dates listed above.
@@ -268,8 +245,6 @@ Deprecated Mount Options
============================    ================
Mounting with V4 filesystem     September 2030
Mounting ascii-ci filesystem    September 2030
ikeep/noikeep			September 2025
attr2/noattr2			September 2025
============================    ================


@@ -285,6 +260,8 @@ Removed Mount Options
  osyncisdsync/osyncisosync	v4.0
  barrier			v4.19
  nobarrier			v4.19
  ikeep/noikeep			v6.18
  attr2/noattr2			v6.18
===========================     =======

sysctls
@@ -312,9 +289,6 @@ The following sysctls are available for the XFS filesystem:
	removes unused preallocation from clean inodes and releases
	the unused space back to the free pool.

  fs.xfs.speculative_cow_prealloc_lifetime
	This is an alias for speculative_prealloc_lifetime.

  fs.xfs.error_level		(Min: 0  Default: 3  Max: 11)
	A volume knob for error reporting when internal errors occur.
	This will generate detailed messages & backtraces for filesystem
@@ -341,17 +315,6 @@ The following sysctls are available for the XFS filesystem:

	This option is intended for debugging only.

  fs.xfs.irix_symlink_mode	(Min: 0  Default: 0  Max: 1)
	Controls whether symlinks are created with mode 0777 (default)
	or whether their mode is affected by the umask (irix mode).

  fs.xfs.irix_sgid_inherit	(Min: 0  Default: 0  Max: 1)
	Controls files created in SGID directories.
	If the group ID of the new file does not match the effective group
	ID or one of the supplementary group IDs of the parent dir, the
	ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
	is set.

  fs.xfs.inherit_sync		(Min: 0  Default: 1  Max: 1)
	Setting this to "1" will cause the "sync" flag set
	by the **xfs_io(8)** chattr command on a directory to be
@@ -387,14 +350,7 @@ The following sysctls are available for the XFS filesystem:
Deprecated Sysctls
==================

===========================================     ================
  Name                                          Removal Schedule
===========================================     ================
fs.xfs.irix_sgid_inherit                        September 2025
fs.xfs.irix_symlink_mode                        September 2025
fs.xfs.speculative_cow_prealloc_lifetime        September 2025
===========================================     ================

None currently.

Removed Sysctls
===============
@@ -404,6 +360,9 @@ Removed Sysctls
=============================	=======
  fs.xfs.xfsbufd_centisec	v4.0
  fs.xfs.age_buffer_centisecs	v4.0
  fs.xfs.irix_symlink_mode      v6.18
  fs.xfs.irix_sgid_inherit      v6.18
  fs.xfs.speculative_cow_prealloc_lifetime      v6.18
=============================	=======

Error handling
+6 −16
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ config XFS_FS
config XFS_SUPPORT_V4
	bool "Support deprecated V4 (crc=0) format"
	depends on XFS_FS
	default y
	default n
	help
	  The V4 filesystem format lacks certain features that are supported
	  by the V5 format, such as metadata checksumming, strengthened
@@ -40,7 +40,7 @@ config XFS_SUPPORT_V4
	  filesystem is a V4 filesystem.  If no such string is found, please
	  upgrade xfsprogs to the latest version and try again.

	  This option will become default N in September 2025.  Support for the
	  This option became default N in September 2025.  Support for the
	  V4 format will be removed entirely in September 2030.  Distributors
	  can say N here to withdraw support earlier.

@@ -50,7 +50,7 @@ config XFS_SUPPORT_V4
config XFS_SUPPORT_ASCII_CI
	bool "Support deprecated case-insensitive ascii (ascii-ci=1) format"
	depends on XFS_FS
	default y
	default n
	help
	  The ASCII case insensitivity filesystem feature only works correctly
	  on systems that have been coerced into using ISO 8859-1, and it does
@@ -67,7 +67,7 @@ config XFS_SUPPORT_ASCII_CI
	  filesystem is a case-insensitive filesystem.  If no such string is
	  found, please upgrade xfsprogs to the latest version and try again.

	  This option will become default N in September 2025.  Support for the
	  This option became default N in September 2025.  Support for the
	  feature will be removed entirely in September 2030.  Distributors
	  can say N here to withdraw support earlier.

@@ -137,7 +137,7 @@ config XFS_BTREE_IN_MEM

config XFS_ONLINE_SCRUB
	bool "XFS online metadata check support"
	default n
	default y
	depends on XFS_FS
	depends on TMPFS && SHMEM
	select XFS_LIVE_HOOKS
@@ -150,12 +150,8 @@ config XFS_ONLINE_SCRUB
	  advantage here is to look for problems proactively so that
	  they can be dealt with in a controlled manner.

	  This feature is considered EXPERIMENTAL.  Use with caution!

	  See the xfs_scrub man page in section 8 for additional information.

	  If unsure, say N.

config XFS_ONLINE_SCRUB_STATS
	bool "XFS online metadata check usage data collection"
	default y
@@ -171,11 +167,9 @@ config XFS_ONLINE_SCRUB_STATS

	  Usage data are collected in /sys/kernel/debug/xfs/scrub.

	  If unsure, say N.

config XFS_ONLINE_REPAIR
	bool "XFS online metadata repair support"
	default n
	default y
	depends on XFS_FS && XFS_ONLINE_SCRUB
	select XFS_BTREE_IN_MEM
	help
@@ -186,12 +180,8 @@ config XFS_ONLINE_REPAIR
	  formatted with secondary metadata, such as reverse mappings and inode
	  parent pointers.

	  This feature is considered EXPERIMENTAL.  Use with caution!

	  See the xfs_scrub man page in section 8 for additional information.

	  If unsure, say N.

config XFS_WARN
	bool "XFS Verbose Warnings"
	depends on XFS_FS && !XFS_DEBUG
+5 −18
Original line number Diff line number Diff line
@@ -667,12 +667,8 @@ xfs_attr_shortform_bytesfit(

	/*
	 * For attr2 we can try to move the forkoff if there is space in the
	 * literal area, but for the old format we are done if there is no
	 * space in the fixed attribute fork.
	 * literal area
	 */
	if (!xfs_has_attr2(mp))
		return 0;

	dsize = dp->i_df.if_bytes;

	switch (dp->i_df.if_format) {
@@ -723,22 +719,16 @@ xfs_attr_shortform_bytesfit(
}

/*
 * Switch on the ATTR2 superblock bit (implies also FEATURES2) unless:
 * - noattr2 mount option is set,
 * - on-disk version bit says it is already set, or
 * - the attr2 mount option is not set to enable automatic upgrade from attr1.
 * Switch on the ATTR2 superblock bit (implies also FEATURES2) unless
 * on-disk version bit says it is already set
 */
STATIC void
xfs_sbversion_add_attr2(
	struct xfs_mount	*mp,
	struct xfs_trans	*tp)
{
	if (xfs_has_noattr2(mp))
		return;
	if (mp->m_sb.sb_features2 & XFS_SB_VERSION2_ATTR2BIT)
		return;
	if (!xfs_has_attr2(mp))
		return;

	spin_lock(&mp->m_sb_lock);
	xfs_add_attr2(mp);
@@ -889,7 +879,7 @@ xfs_attr_sf_removename(
	/*
	 * Fix up the start offset of the attribute fork
	 */
	if (totsize == sizeof(struct xfs_attr_sf_hdr) && xfs_has_attr2(mp) &&
	if (totsize == sizeof(struct xfs_attr_sf_hdr) &&
	    (dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
	    !(args->op_flags & (XFS_DA_OP_ADDNAME | XFS_DA_OP_REPLACE)) &&
	    !xfs_has_parent(mp)) {
@@ -900,7 +890,6 @@ xfs_attr_sf_removename(
		ASSERT(dp->i_forkoff);
		ASSERT(totsize > sizeof(struct xfs_attr_sf_hdr) ||
				(args->op_flags & XFS_DA_OP_ADDNAME) ||
				!xfs_has_attr2(mp) ||
				dp->i_df.if_format == XFS_DINODE_FMT_BTREE ||
				xfs_has_parent(mp));
		xfs_trans_log_inode(args->trans, dp,
@@ -1040,8 +1029,7 @@ xfs_attr_shortform_allfit(
		bytes += xfs_attr_sf_entsize_byname(name_loc->namelen,
					be16_to_cpu(name_loc->valuelen));
	}
	if (xfs_has_attr2(dp->i_mount) &&
	    (dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
	if ((dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
	    (bytes == sizeof(struct xfs_attr_sf_hdr)))
		return -1;
	return xfs_attr_shortform_bytesfit(dp, bytes);
@@ -1161,7 +1149,6 @@ xfs_attr3_leaf_to_shortform(
		 * this case.
		 */
		if (!(args->op_flags & XFS_DA_OP_REPLACE)) {
			ASSERT(xfs_has_attr2(dp->i_mount));
			ASSERT(dp->i_df.if_format != XFS_DINODE_FMT_BTREE);
			xfs_attr_fork_remove(dp, args->trans);
		}
+3 −11
Original line number Diff line number Diff line
@@ -997,8 +997,7 @@ xfs_bmap_add_attrfork_local(
static int
xfs_bmap_set_attrforkoff(
	struct xfs_inode	*ip,
	int			size,
	int			*version)
	int			size)
{
	int			default_size = xfs_default_attroffset(ip) >> 3;

@@ -1012,8 +1011,6 @@ xfs_bmap_set_attrforkoff(
		ip->i_forkoff = xfs_attr_shortform_bytesfit(ip, size);
		if (!ip->i_forkoff)
			ip->i_forkoff = default_size;
		else if (xfs_has_attr2(ip->i_mount) && version)
			*version = 2;
		break;
	default:
		ASSERT(0);
@@ -1035,7 +1032,6 @@ xfs_bmap_add_attrfork(
	int			rsvd)		/* xact may use reserved blks */
{
	struct xfs_mount	*mp = tp->t_mountp;
	int			version = 1;	/* superblock attr version */
	int			logflags;	/* logging flags */
	int			error;		/* error return value */

@@ -1045,7 +1041,7 @@ xfs_bmap_add_attrfork(
	ASSERT(!xfs_inode_has_attr_fork(ip));

	xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
	error = xfs_bmap_set_attrforkoff(ip, size, &version);
	error = xfs_bmap_set_attrforkoff(ip, size);
	if (error)
		return error;

@@ -1069,16 +1065,12 @@ xfs_bmap_add_attrfork(
		xfs_trans_log_inode(tp, ip, logflags);
	if (error)
		return error;
	if (!xfs_has_attr(mp) ||
	   (!xfs_has_attr2(mp) && version == 2)) {
	if (!xfs_has_attr(mp)) {
		bool log_sb = false;

		spin_lock(&mp->m_sb_lock);
		if (!xfs_has_attr(mp)) {
			xfs_add_attr(mp);
			log_sb = true;
		}
		if (!xfs_has_attr2(mp) && version == 2) {
			xfs_add_attr2(mp);
			log_sb = true;
		}
+2 −2
Original line number Diff line number Diff line
@@ -2140,7 +2140,7 @@ xfs_difree_inobt(
	 * remove the chunk if the block size is large enough for multiple inode
	 * chunks (that might not be free).
	 */
	if (!xfs_has_ikeep(mp) && rec.ir_free == XFS_INOBT_ALL_FREE &&
	if (rec.ir_free == XFS_INOBT_ALL_FREE &&
	    mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
		xic->deleted = true;
		xic->first_ino = xfs_agino_to_ino(pag, rec.ir_startino);
@@ -2286,7 +2286,7 @@ xfs_difree_finobt(
	 * enough for multiple chunks. Leave the finobt record to remain in sync
	 * with the inobt.
	 */
	if (!xfs_has_ikeep(mp) && rec.ir_free == XFS_INOBT_ALL_FREE &&
	if (rec.ir_free == XFS_INOBT_ALL_FREE &&
	    mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
		error = xfs_btree_delete(cur, &i);
		if (error)
Loading