Skip to content

Commit e445fba

Browse files
committed
Merge tag 'xfs-merge-6.18' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs updates from Carlos Maiolino: "For this merge window, there are really no new features, but there are a few things worth to emphasize: - Deprecated for years already, the (no)attr2 and (no)ikeep mount options have been removed for good - Several cleanups (specially from typedefs) and bug fixes - Improvements made in the online repair reap calculations - online fsck is now enabled by default" * tag 'xfs-merge-6.18' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (53 commits) xfs: rework datasync tracking and execution xfs: rearrange code in xfs_inode_item_precommit xfs: scrub: use kstrdup_const() for metapath scan setups xfs: use bt_nr_sectors in xfs_dax_translate_range xfs: track the number of blocks in each buftarg xfs: constify xfs_errortag_random_default xfs: improve default maximum number of open zones xfs: improve zone statistics message xfs: centralize error tag definitions xfs: remove pointless externs in xfs_error.h xfs: remove the expr argument to XFS_TEST_ERROR xfs: remove xfs_errortag_set xfs: remove xfs_errortag_get xfs: move the XLOG_REG_ constants out of xfs_log_format.h xfs: adjust the hint based zone allocation policy xfs: refactor hint based zone allocation fs: add an enum for number of life time hints xfs: fix log CRC mismatches between i386 and other architectures xfs: rename the old_crc variable in xlog_recover_process xfs: remove the unused xfs_log_iovec_t typedef ...
2 parents a40eb50 + c91d38b commit e445fba

65 files changed

Lines changed: 1249 additions & 1053 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/admin-guide/xfs.rst

Lines changed: 14 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,6 @@ When mounting an XFS filesystem, the following options are accepted.
3434
to the file. Specifying a fixed ``allocsize`` value turns off
3535
the dynamic behaviour.
3636

37-
attr2 or noattr2
38-
The options enable/disable an "opportunistic" improvement to
39-
be made in the way inline extended attributes are stored
40-
on-disk. When the new form is used for the first time when
41-
``attr2`` is selected (either when setting or removing extended
42-
attributes) the on-disk superblock feature bit field will be
43-
updated to reflect this format being in use.
44-
45-
The default behaviour is determined by the on-disk feature
46-
bit indicating that ``attr2`` behaviour is active. If either
47-
mount option is set, then that becomes the new default used
48-
by the filesystem.
49-
50-
CRC enabled filesystems always use the ``attr2`` format, and so
51-
will reject the ``noattr2`` mount option if it is set.
52-
5337
discard or nodiscard (default)
5438
Enable/disable the issuing of commands to let the block
5539
device reclaim space freed by the filesystem. This is
@@ -75,12 +59,6 @@ When mounting an XFS filesystem, the following options are accepted.
7559
across the entire filesystem rather than just on directories
7660
configured to use it.
7761

78-
ikeep or noikeep (default)
79-
When ``ikeep`` is specified, XFS does not delete empty inode
80-
clusters and keeps them around on disk. When ``noikeep`` is
81-
specified, empty inode clusters are returned to the free
82-
space pool.
83-
8462
inode32 or inode64 (default)
8563
When ``inode32`` is specified, it indicates that XFS limits
8664
inode creation to locations which will not result in inode
@@ -253,9 +231,8 @@ latest version and try again.
253231

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

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

275250

@@ -285,6 +260,8 @@ Removed Mount Options
285260
osyncisdsync/osyncisosync v4.0
286261
barrier v4.19
287262
nobarrier v4.19
263+
ikeep/noikeep v6.18
264+
attr2/noattr2 v6.18
288265
=========================== =======
289266

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

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

342316
This option is intended for debugging only.
343317

344-
fs.xfs.irix_symlink_mode (Min: 0 Default: 0 Max: 1)
345-
Controls whether symlinks are created with mode 0777 (default)
346-
or whether their mode is affected by the umask (irix mode).
347-
348-
fs.xfs.irix_sgid_inherit (Min: 0 Default: 0 Max: 1)
349-
Controls files created in SGID directories.
350-
If the group ID of the new file does not match the effective group
351-
ID or one of the supplementary group IDs of the parent dir, the
352-
ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
353-
is set.
354-
355318
fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1)
356319
Setting this to "1" will cause the "sync" flag set
357320
by the **xfs_io(8)** chattr command on a directory to be
@@ -387,24 +350,20 @@ The following sysctls are available for the XFS filesystem:
387350
Deprecated Sysctls
388351
==================
389352

390-
=========================================== ================
391-
Name Removal Schedule
392-
=========================================== ================
393-
fs.xfs.irix_sgid_inherit September 2025
394-
fs.xfs.irix_symlink_mode September 2025
395-
fs.xfs.speculative_cow_prealloc_lifetime September 2025
396-
=========================================== ================
397-
353+
None currently.
398354

399355
Removed Sysctls
400356
===============
401357

402-
============================= =======
403-
Name Removed
404-
============================= =======
405-
fs.xfs.xfsbufd_centisec v4.0
406-
fs.xfs.age_buffer_centisecs v4.0
407-
============================= =======
358+
========================================== =======
359+
Name Removed
360+
========================================== =======
361+
fs.xfs.xfsbufd_centisec v4.0
362+
fs.xfs.age_buffer_centisecs v4.0
363+
fs.xfs.irix_symlink_mode v6.18
364+
fs.xfs.irix_sgid_inherit v6.18
365+
fs.xfs.speculative_cow_prealloc_lifetime v6.18
366+
========================================== =======
408367

409368
Error handling
410369
==============

fs/xfs/Kconfig

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ config XFS_FS
2525
config XFS_SUPPORT_V4
2626
bool "Support deprecated V4 (crc=0) format"
2727
depends on XFS_FS
28-
default y
28+
default n
2929
help
3030
The V4 filesystem format lacks certain features that are supported
3131
by the V5 format, such as metadata checksumming, strengthened
@@ -40,7 +40,7 @@ config XFS_SUPPORT_V4
4040
filesystem is a V4 filesystem. If no such string is found, please
4141
upgrade xfsprogs to the latest version and try again.
4242

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

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

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

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

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

153-
This feature is considered EXPERIMENTAL. Use with caution!
154-
155153
See the xfs_scrub man page in section 8 for additional information.
156154

157-
If unsure, say N.
158-
159155
config XFS_ONLINE_SCRUB_STATS
160156
bool "XFS online metadata check usage data collection"
161157
default y
@@ -171,11 +167,9 @@ config XFS_ONLINE_SCRUB_STATS
171167

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

174-
If unsure, say N.
175-
176170
config XFS_ONLINE_REPAIR
177171
bool "XFS online metadata repair support"
178-
default n
172+
default y
179173
depends on XFS_FS && XFS_ONLINE_SCRUB
180174
select XFS_BTREE_IN_MEM
181175
help
@@ -186,12 +180,8 @@ config XFS_ONLINE_REPAIR
186180
formatted with secondary metadata, such as reverse mappings and inode
187181
parent pointers.
188182

189-
This feature is considered EXPERIMENTAL. Use with caution!
190-
191183
See the xfs_scrub man page in section 8 for additional information.
192184

193-
If unsure, say N.
194-
195185
config XFS_WARN
196186
bool "XFS Verbose Warnings"
197187
depends on XFS_FS && !XFS_DEBUG

fs/xfs/libxfs/xfs_ag_resv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ xfs_ag_resv_critical(
9292
trace_xfs_ag_resv_critical(pag, type, avail);
9393

9494
/* Critically low if less than 10% or max btree height remains. */
95-
return XFS_TEST_ERROR(avail < orig / 10 ||
96-
avail < mp->m_agbtree_maxlevels,
97-
mp, XFS_ERRTAG_AG_RESV_CRITICAL);
95+
return avail < orig / 10 || avail < mp->m_agbtree_maxlevels ||
96+
XFS_TEST_ERROR(mp, XFS_ERRTAG_AG_RESV_CRITICAL);
9897
}
9998

10099
/*
@@ -203,7 +202,7 @@ __xfs_ag_resv_init(
203202
return -EINVAL;
204203
}
205204

206-
if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_AG_RESV_FAIL))
205+
if (XFS_TEST_ERROR(mp, XFS_ERRTAG_AG_RESV_FAIL))
207206
error = -ENOSPC;
208207
else
209208
error = xfs_dec_fdblocks(mp, hidden_space, true);

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,7 @@ xfs_agf_read_verify(
33213321
xfs_verifier_error(bp, -EFSBADCRC, __this_address);
33223322
else {
33233323
fa = xfs_agf_verify(bp);
3324-
if (XFS_TEST_ERROR(fa, mp, XFS_ERRTAG_ALLOC_READ_AGF))
3324+
if (fa || XFS_TEST_ERROR(mp, XFS_ERRTAG_ALLOC_READ_AGF))
33253325
xfs_verifier_error(bp, -EFSCORRUPTED, fa);
33263326
}
33273327
}
@@ -4019,8 +4019,7 @@ __xfs_free_extent(
40194019
ASSERT(len != 0);
40204020
ASSERT(type != XFS_AG_RESV_AGFL);
40214021

4022-
if (XFS_TEST_ERROR(false, mp,
4023-
XFS_ERRTAG_FREE_EXTENT))
4022+
if (XFS_TEST_ERROR(mp, XFS_ERRTAG_FREE_EXTENT))
40244023
return -EIO;
40254024

40264025
error = xfs_free_extent_fix_freelist(tp, pag, &agbp);

fs/xfs/libxfs/xfs_attr_leaf.c

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -667,12 +667,8 @@ xfs_attr_shortform_bytesfit(
667667

668668
/*
669669
* For attr2 we can try to move the forkoff if there is space in the
670-
* literal area, but for the old format we are done if there is no
671-
* space in the fixed attribute fork.
670+
* literal area
672671
*/
673-
if (!xfs_has_attr2(mp))
674-
return 0;
675-
676672
dsize = dp->i_df.if_bytes;
677673

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

725721
/*
726-
* Switch on the ATTR2 superblock bit (implies also FEATURES2) unless:
727-
* - noattr2 mount option is set,
728-
* - on-disk version bit says it is already set, or
729-
* - the attr2 mount option is not set to enable automatic upgrade from attr1.
722+
* Switch on the ATTR2 superblock bit (implies also FEATURES2) unless
723+
* on-disk version bit says it is already set
730724
*/
731725
STATIC void
732726
xfs_sbversion_add_attr2(
733727
struct xfs_mount *mp,
734728
struct xfs_trans *tp)
735729
{
736-
if (xfs_has_noattr2(mp))
737-
return;
738730
if (mp->m_sb.sb_features2 & XFS_SB_VERSION2_ATTR2BIT)
739731
return;
740-
if (!xfs_has_attr2(mp))
741-
return;
742732

743733
spin_lock(&mp->m_sb_lock);
744734
xfs_add_attr2(mp);
@@ -889,7 +879,7 @@ xfs_attr_sf_removename(
889879
/*
890880
* Fix up the start offset of the attribute fork
891881
*/
892-
if (totsize == sizeof(struct xfs_attr_sf_hdr) && xfs_has_attr2(mp) &&
882+
if (totsize == sizeof(struct xfs_attr_sf_hdr) &&
893883
(dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
894884
!(args->op_flags & (XFS_DA_OP_ADDNAME | XFS_DA_OP_REPLACE)) &&
895885
!xfs_has_parent(mp)) {
@@ -900,7 +890,6 @@ xfs_attr_sf_removename(
900890
ASSERT(dp->i_forkoff);
901891
ASSERT(totsize > sizeof(struct xfs_attr_sf_hdr) ||
902892
(args->op_flags & XFS_DA_OP_ADDNAME) ||
903-
!xfs_has_attr2(mp) ||
904893
dp->i_df.if_format == XFS_DINODE_FMT_BTREE ||
905894
xfs_has_parent(mp));
906895
xfs_trans_log_inode(args->trans, dp,
@@ -1040,8 +1029,7 @@ xfs_attr_shortform_allfit(
10401029
bytes += xfs_attr_sf_entsize_byname(name_loc->namelen,
10411030
be16_to_cpu(name_loc->valuelen));
10421031
}
1043-
if (xfs_has_attr2(dp->i_mount) &&
1044-
(dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
1032+
if ((dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
10451033
(bytes == sizeof(struct xfs_attr_sf_hdr)))
10461034
return -1;
10471035
return xfs_attr_shortform_bytesfit(dp, bytes);
@@ -1161,7 +1149,6 @@ xfs_attr3_leaf_to_shortform(
11611149
* this case.
11621150
*/
11631151
if (!(args->op_flags & XFS_DA_OP_REPLACE)) {
1164-
ASSERT(xfs_has_attr2(dp->i_mount));
11651152
ASSERT(dp->i_df.if_format != XFS_DINODE_FMT_BTREE);
11661153
xfs_attr_fork_remove(dp, args->trans);
11671154
}
@@ -1225,7 +1212,7 @@ xfs_attr3_leaf_to_node(
12251212

12261213
trace_xfs_attr_leaf_to_node(args);
12271214

1228-
if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_ATTR_LEAF_TO_NODE)) {
1215+
if (XFS_TEST_ERROR(mp, XFS_ERRTAG_ATTR_LEAF_TO_NODE)) {
12291216
error = -EIO;
12301217
goto out;
12311218
}

0 commit comments

Comments
 (0)