Skip to content

Commit 89e0eb8

Browse files
author
Darrick J. Wong
committed
xfs: restore speculative_cow_prealloc_lifetime sysctl
In commit 9669f51 I tried to get rid of the undocumented cow gc lifetime knob. The knob's function was never documented and it now doesn't really have a function since eof and cow gc have been consolidated. Regrettably, xfs/231 relies on it and regresses on for-next. I did not succeed at getting far enough through fstests patch review for the fixup to land in time. Restore the sysctl knob, document what it did (does?), put it on the deprecation schedule, and rip out a redundant function. Fixes: 9669f51 ("xfs: consolidate the eofblocks and cowblocks workers") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent 1cd738b commit 89e0eb8

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

Documentation/admin-guide/xfs.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ The following sysctls are available for the XFS filesystem:
284284
removes unused preallocation from clean inodes and releases
285285
the unused space back to the free pool.
286286

287+
fs.xfs.speculative_cow_prealloc_lifetime
288+
This is an alias for speculative_prealloc_lifetime.
289+
287290
fs.xfs.error_level (Min: 0 Default: 3 Max: 11)
288291
A volume knob for error reporting when internal errors occur.
289292
This will generate detailed messages & backtraces for filesystem
@@ -356,12 +359,13 @@ The following sysctls are available for the XFS filesystem:
356359
Deprecated Sysctls
357360
==================
358361

359-
=========================== ================
360-
Name Removal Schedule
361-
=========================== ================
362-
fs.xfs.irix_sgid_inherit September 2025
363-
fs.xfs.irix_symlink_mode September 2025
364-
=========================== ================
362+
=========================================== ================
363+
Name Removal Schedule
364+
=========================================== ================
365+
fs.xfs.irix_sgid_inherit September 2025
366+
fs.xfs.irix_symlink_mode September 2025
367+
fs.xfs.speculative_cow_prealloc_lifetime September 2025
368+
=========================================== ================
365369

366370

367371
Removed Sysctls

fs/xfs/xfs_sysctl.c

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,32 +51,16 @@ xfs_panic_mask_proc_handler(
5151
#endif /* CONFIG_PROC_FS */
5252

5353
STATIC int
54-
xfs_deprecate_irix_sgid_inherit_proc_handler(
54+
xfs_deprecated_dointvec_minmax(
5555
struct ctl_table *ctl,
5656
int write,
5757
void *buffer,
5858
size_t *lenp,
5959
loff_t *ppos)
6060
{
6161
if (write) {
62-
printk_once(KERN_WARNING
63-
"XFS: " "%s sysctl option is deprecated.\n",
64-
ctl->procname);
65-
}
66-
return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
67-
}
68-
69-
STATIC int
70-
xfs_deprecate_irix_symlink_mode_proc_handler(
71-
struct ctl_table *ctl,
72-
int write,
73-
void *buffer,
74-
size_t *lenp,
75-
loff_t *ppos)
76-
{
77-
if (write) {
78-
printk_once(KERN_WARNING
79-
"XFS: " "%s sysctl option is deprecated.\n",
62+
printk_ratelimited(KERN_WARNING
63+
"XFS: %s sysctl option is deprecated.\n",
8064
ctl->procname);
8165
}
8266
return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
@@ -88,7 +72,7 @@ static struct ctl_table xfs_table[] = {
8872
.data = &xfs_params.sgid_inherit.val,
8973
.maxlen = sizeof(int),
9074
.mode = 0644,
91-
.proc_handler = xfs_deprecate_irix_sgid_inherit_proc_handler,
75+
.proc_handler = xfs_deprecated_dointvec_minmax,
9276
.extra1 = &xfs_params.sgid_inherit.min,
9377
.extra2 = &xfs_params.sgid_inherit.max
9478
},
@@ -97,7 +81,7 @@ static struct ctl_table xfs_table[] = {
9781
.data = &xfs_params.symlink_mode.val,
9882
.maxlen = sizeof(int),
9983
.mode = 0644,
100-
.proc_handler = xfs_deprecate_irix_symlink_mode_proc_handler,
84+
.proc_handler = xfs_deprecated_dointvec_minmax,
10185
.extra1 = &xfs_params.symlink_mode.min,
10286
.extra2 = &xfs_params.symlink_mode.max
10387
},
@@ -201,6 +185,15 @@ static struct ctl_table xfs_table[] = {
201185
.extra1 = &xfs_params.blockgc_timer.min,
202186
.extra2 = &xfs_params.blockgc_timer.max,
203187
},
188+
{
189+
.procname = "speculative_cow_prealloc_lifetime",
190+
.data = &xfs_params.blockgc_timer.val,
191+
.maxlen = sizeof(int),
192+
.mode = 0644,
193+
.proc_handler = xfs_deprecated_dointvec_minmax,
194+
.extra1 = &xfs_params.blockgc_timer.min,
195+
.extra2 = &xfs_params.blockgc_timer.max,
196+
},
204197
/* please keep this the last entry */
205198
#ifdef CONFIG_PROC_FS
206199
{

0 commit comments

Comments
 (0)