Add warning for zfs_vdev_elevator option removal

Originally the zfs_vdev_elevator module option was added as a
convenience so the requested elevator would be automatically set
on the underlying block devices.  At the time this was simple
because the kernel provided an API function which did exactly this.

This API was then removed in the Linux 4.12 kernel which prompted
us to add compatibly code to set the elevator via a usermodehelper.
While well intentioned this introduced a bug which could cause a
system hang, that issue was subsequently fixed by commit 2a0d4188.

In order to avoid future bugs in this area, and to simplify the code,
this functionality is being deprecated.  A console warning has been
added to notify any existing consumers and the documentation updated
accordingly.  This option will remain for the lifetime of the 0.8.x
series for compatibility but if planned to be phased out of master.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #8664
Closes #9317
This commit is contained in:
Brian Behlendorf 2019-09-25 09:23:29 -07:00 committed by GitHub
parent 5df7e9d85c
commit f81d5ef686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -3188,8 +3188,10 @@ Default value: \fB32,768\fR.
\fBzfs_vdev_scheduler\fR (charp) \fBzfs_vdev_scheduler\fR (charp)
.ad .ad
.RS 12n .RS 12n
Set the Linux I/O scheduler on whole disk vdevs to this scheduler. Valid options Set the Linux I/O scheduler on whole disk vdevs to this scheduler. This
are noop, cfq, bfq & deadline option has been deprecated and will be removed in a future release. The
standard \fB/sys/block/<block>/queue/scheduler\fR interface should be used
to set a block device scheduler.
.sp .sp
Default value: \fBnoop\fR. Default value: \fBnoop\fR.
.RE .RE

View File

@ -930,7 +930,14 @@ param_set_vdev_scheduler(const char *val, zfs_kernel_param_t *kp)
mutex_exit(&spa_namespace_lock); mutex_exit(&spa_namespace_lock);
} }
return (param_set_charp(val, kp));
int error = param_set_charp(val, kp);
if (error == 0) {
printk(KERN_INFO "The 'zfs_vdev_scheduler' module option "
"will be removed in a future release.\n");
}
return (error);
} }
vdev_ops_t vdev_disk_ops = { vdev_ops_t vdev_disk_ops = {