Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove zfs_vdev_elevator module option #9317

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

behlendorf
Copy link
Contributor

Motivation and Context

Issue #8664. This PR proposes the removal of the zfs_vdev_elevator
module option for the following reasons:

  1. complexity in supporting it; as observed in Crash on scrub #8664 the current
    implementation may lead to unexpected consequences.
  2. depending on the kernel version and block device driver, the
    available elevators can vary significantly; this makes it difficult
    to manage from within the zfs.ko since the available options
    cannot be easily queried (or set).
  3. managing this from userspace is straight forward and more
    flexible, the initramfs scripts already do this and other scripts
    could be updated as appropriate.

Note: This PR entirely removes the module option. However, we
may instead want to leave it in place but disable it and update the
documentation accordingly. This would ensure that any systems
which are setting the module option are still able to load the kmod.

Description

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 can result in a system hang if the
usermodehelper does not return. This is because it may be called
with the spa config lock held as a writter. For example via the
zfs_ioc_pool_scan() -> spa_scan() -> spa_scan() -> vdev_reopen()
call path.

Additionally, there's a reasonable argument that setting the elevator
is the responsibility of whatever software is being used to configure
the system. Therefore, it's proposed that the zfs_vdev_elevator
be removed.

How Has This Been Tested?

Locally compiled, all referenced to the module option we're remove
the source and documentation.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added the Status: Design Review Needed Architecture or design is under discussion label Sep 12, 2019
@behlendorf behlendorf mentioned this pull request Sep 12, 2019
@loli10K
Copy link
Contributor

loli10K commented Sep 12, 2019

This is because it may be called
with the spa config lock held as a writter. For example via the
zfs_ioc_pool_scan() -> spa_scan() -> spa_scan() -> vdev_reopen()
call path.

This matches what i was investigating, unfortunately i had to leave debugging halfway to cover a shift. I was going to propose changing UMH_WAIT_PROC to UMH_WAIT_EXEC but removing the usermode helper call entirely is probably more reasonable and safe in the long run.

@codecov
Copy link

codecov bot commented Sep 12, 2019

Codecov Report

Merging #9317 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9317      +/-   ##
==========================================
- Coverage   79.14%   79.13%   -0.02%     
==========================================
  Files         401      401              
  Lines      122077   122042      -35     
==========================================
- Hits        96617    96577      -40     
- Misses      25460    25465       +5
Flag Coverage Δ
#kernel 79.72% <ø> (-0.04%) ⬇️
#user 66.89% <ø> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d666206...f9a619c. Read the comment docs.

@openzfs openzfs deleted a comment from codecov bot Sep 12, 2019
@behlendorf
Copy link
Contributor Author

I was going to propose changing UMH_WAIT_PROC to UMH_WAIT_EXEC

@loli10K that's an interesting idea I hadn't really considered. While I do think we want to remove this in master, switching UMH_WAIT_PROC to UMH_WAIT_EXEC might be a nice way to handle this for the 0.8.x releases. Since you were able to reproduce this issue locally, would be mind testing your proposed fix to see if it does resolve the issue as expected?

@loli10K
Copy link
Contributor

loli10K commented Sep 12, 2019

@behlendorf without any change to the 0.8 release branch i can deadlock my Debian builder, kernel 5.2.14, mirror root pool (with primarycache=none) by just running zpool scrub rpool once:

[  162.384329] INFO: task txg_sync:526 blocked for more than 10 seconds.
[  162.386371]       Tainted: P           OE     5.2.14 #2
[  162.388006] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  162.390472] txg_sync        D    0   526      2 0x80004000
[  162.392587] Call Trace:
[  162.393532]  ? __schedule+0x244/0x5f0
[  162.394777]  schedule+0x2f/0xa0
[  162.395333]  cv_wait_common+0x156/0x290 [spl]
[  162.396084]  ? do_wait_intr_irq+0xb0/0xb0
[  162.396847]  spa_config_enter+0x13b/0x1e0 [zfs]
[  162.397653]  spa_sync+0x1e7/0x1830 [zfs]
[  162.398353]  ? zfs_refcount_remove_many+0x1ea/0x270 [zfs]
[  162.399263]  ? _cond_resched+0x15/0x30
[  162.399906]  ? mutex_lock+0xe/0x30
[  162.400568]  ? spa_txg_history_set+0xde/0x130 [zfs]
[  162.401424]  ? spa_txg_history_init_io+0xdc/0x110 [zfs]
[  162.402341]  txg_sync_thread+0x2c3/0x540 [zfs]
[  162.403137]  ? txg_thread_exit.isra.7+0xe0/0xe0 [zfs]
[  162.403983]  ? __thread_exit+0x20/0x20 [spl]
[  162.404732]  thread_generic_wrapper+0x76/0xb0 [spl]
[  162.405553]  kthread+0x114/0x130
[  162.406097]  ? __kthread_cancel_work+0x80/0x80
[  162.406848]  ret_from_fork+0x1f/0x30
[  162.407458] INFO: task zpool:2645 blocked for more than 10 seconds.
[  162.408524]       Tainted: P           OE     5.2.14 #2
[  162.409390] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  162.410713] zpool           D    0  2645   1320 0x00004000
[  162.411636] Call Trace:
[  162.412061]  ? __schedule+0x244/0x5f0
[  162.412755]  ? vdev_open_children+0x160/0x160 [zfs]
[  162.413594]  schedule+0x2f/0xa0
[  162.414138]  taskq_wait+0x7a/0xc0 [spl]
[  162.414795]  ? do_wait_intr_irq+0xb0/0xb0
[  162.415477]  taskq_destroy+0x50/0x420 [spl]
[  162.416235]  ? vdev_open_children+0x160/0x160 [zfs]
[  162.417469]  vdev_open_children+0x10a/0x160 [zfs]
[  162.418653]  vdev_root_open+0x37/0x120 [zfs]
[  162.419733]  vdev_open+0xd3/0x900 [zfs]
[  162.420725]  vdev_reopen+0x4c/0x100 [zfs]
[  162.421734]  dsl_scan+0x36/0x120 [zfs]
[  162.422687]  zfs_ioc_pool_scan+0x5a/0xd0 [zfs]
[  162.423794]  zfsdev_ioctl+0x6ea/0x9b0 [zfs]
[  162.424829]  ? __lru_cache_add+0x55/0x70
[  162.425775]  ? __handle_mm_fault+0xa97/0x1230
[  162.426732]  do_vfs_ioctl+0xa1/0x600
[  162.427251]  ksys_ioctl+0x60/0x90
[  162.427745]  __x64_sys_ioctl+0x16/0x20
[  162.428324]  do_syscall_64+0x4f/0x130
[  162.428958]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  162.429821] RIP: 0033:0x7f8d1a262427
[  162.430433] Code: Bad RIP value.
[  162.430992] RSP: 002b:00007ffc519705f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  162.432294] RAX: ffffffffffffffda RBX: 00007ffc51970a30 RCX: 00007f8d1a262427
[  162.433504] RDX: 00007ffc51970a30 RSI: 0000000000005a07 RDI: 0000000000000003
[  162.434715] RBP: 00007ffc51974010 R08: 0000000000000008 R09: 0000000000000001
[  162.435924] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
[  162.437149] R13: 0000000000000000 R14: 0000557c6944e570 R15: 0000557c6944c430
[  162.438364] INFO: task vdev_open:2646 blocked for more than 10 seconds.
[  162.439422]       Tainted: P           OE     5.2.14 #2
[  162.440179] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  162.441320] vdev_open       D    0  2646      2 0x80004000
[  162.442263] Call Trace:
[  162.442692]  ? __schedule+0x244/0x5f0
[  162.443359]  ? vdev_open_children+0x160/0x160 [zfs]
[  162.444209]  schedule+0x2f/0xa0
[  162.444759]  taskq_wait+0x7a/0xc0 [spl]
[  162.445413]  ? do_wait_intr_irq+0xb0/0xb0
[  162.446108]  taskq_destroy+0x50/0x420 [spl]
[  162.446865]  ? vdev_open_children+0x160/0x160 [zfs]
[  162.447743]  vdev_open_children+0x10a/0x160 [zfs]
[  162.448609]  vdev_mirror_open+0x2c/0x140 [zfs]
[  162.449408]  vdev_open+0xd3/0x900 [zfs]
[  162.450071]  ? __schedule+0x24c/0x5f0
[  162.450740]  vdev_open_child+0x1e/0x40 [zfs]
[  162.451473]  taskq_thread+0x30e/0x630 [spl]
[  162.452209]  ? wake_up_q+0x70/0x70
[  162.452802]  ? taskq_thread_spawn+0x50/0x50 [spl]
[  162.453608]  kthread+0x114/0x130
[  162.454167]  ? __kthread_cancel_work+0x80/0x80
[  162.454929]  ret_from_fork+0x1f/0x30
[  162.455551] INFO: task vdev_open:2648 blocked for more than 10 seconds.
[  162.456695]       Tainted: P           OE     5.2.14 #2
[  162.457590] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  162.458913] vdev_open       D    0  2648      2 0x80004000
[  162.459849] Call Trace:
[  162.460290]  ? __schedule+0x244/0x5f0
[  162.460893]  schedule+0x2f/0xa0
[  162.461358]  schedule_timeout+0x20a/0x300
[  162.461953]  ? try_to_wake_up+0x54/0x450
[  162.462531]  wait_for_completion+0x11f/0x190
[  162.463152]  ? wake_up_q+0x70/0x70
[  162.463656]  call_usermodehelper_exec+0x127/0x160
[  162.464435]  vdev_elevator_switch+0x112/0x1a0 [zfs]
[  162.465210]  vdev_disk_open+0x292/0x4a0 [zfs]
[  162.465901]  vdev_open+0xd3/0x900 [zfs]
[  162.466461]  ? __schedule+0x24c/0x5f0
[  162.467041]  vdev_open_child+0x1e/0x40 [zfs]
[  162.467672]  taskq_thread+0x30e/0x630 [spl]
[  162.468318]  ? wake_up_q+0x70/0x70
[  162.468839]  ? taskq_thread_spawn+0x50/0x50 [spl]
[  162.469540]  kthread+0x114/0x130
[  162.470012]  ? __kthread_cancel_work+0x80/0x80
[  162.470658]  ret_from_fork+0x1f/0x30
[  162.471179] INFO: task modprobe:2650 blocked for more than 10 seconds.
[  162.472124]       Tainted: P           OE     5.2.14 #2
[  162.472917] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  162.474073] modprobe        D    0  2650    206 0x00000000
[  162.474865] Call Trace:
[  162.475226]  ? __schedule+0x244/0x5f0
[  162.475764]  schedule+0x2f/0xa0
[  162.476264]  cv_wait_common+0x156/0x290 [spl]
[  162.476916]  ? do_wait_intr_irq+0xb0/0xb0
[  162.477545]  spa_config_enter+0x13b/0x1e0 [zfs]
[  162.478245]  zio_vdev_io_start+0x51d/0x590 [zfs]
[  162.478927]  ? tsd_get_by_thread+0x3b/0x80 [spl]
[  162.479639]  zio_nowait+0x142/0x2f0 [zfs]
[  162.480297]  arc_read+0xb2d/0x19d0 [zfs]
[  162.480927]  ? dbuf_rele_and_unlock+0x740/0x740 [zfs]
[  162.481706]  dbuf_read+0x2ec/0x1160 [zfs]
[  162.482315]  dmu_buf_hold_array_by_dnode+0x115/0x5b0 [zfs]
[  162.483138]  dmu_read_uio_dnode+0x4b/0x140 [zfs]
[  162.483844]  dmu_read_uio_dbuf+0x3f/0x60 [zfs]
[  162.484596]  zfs_read+0x127/0x480 [zfs]
[  162.485168]  ? path_openat+0x2e5/0x1400
[  162.485769]  zpl_read_common_iovec+0xa6/0x130 [zfs]
[  162.486512]  zpl_iter_read+0xfa/0x170 [zfs]
[  162.487128]  new_sync_read+0x124/0x1b0
[  162.487677]  vfs_read+0x91/0x140
[  162.488148]  ksys_read+0x59/0xd0
[  162.488658]  do_syscall_64+0x4f/0x130
[  162.489206]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  162.489938] RIP: 0033:0x7f141741c461
[  162.490471] Code: Bad RIP value.
[  162.490950] RSP: 002b:00007ffd69e64da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[  162.492041] RAX: ffffffffffffffda RBX: 00005654874015f0 RCX: 00007f141741c461
[  162.493105] RDX: 0000000000000400 RSI: 0000565487401930 RDI: 0000000000000000
[  162.494164] RBP: 0000000000000d68 R08: 0000565487401920 R09: 00007f14174ee3e0
[  162.495185] R10: 0000565487401010 R11: 0000000000000246 R12: 00007f14174e9760
[  162.496244] R13: 00007f14174ea2a0 R14: 0000000000000000 R15: 0000565487401470

I believe this is the deadlock reported in the original issue, modprobe is waiting for spa_config_enter() while being waited by the usermodehelper call.

With the following patch applied the same system survives running zpool scrub rpool/zpool scrub -s rpool in a loop:

diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 1419ae6ad..e38089c13 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -220,7 +220,7 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
        char *envp[] = { NULL };
 
        argv[2] = kmem_asprintf(SET_SCHEDULER_CMD, device, elevator);
-       error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
+       error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
        strfree(argv[2]);
 #endif /* HAVE_ELEVATOR_CHANGE */
        if (error) {

modprobe is still being called but is not deadlocking the system now:

root@linux:~# sysdig proc.name = modprobe and evt.type = execve
7613 22:08:13.569920545 2 modprobe (10218) < execve res=0 exe=/sbin/modprobe args=-q.--.noop-iosched. tid=10218(modprobe) pid=10218(modprobe) ptid=204 cwd= fdlimit=1024 pgft_maj=0 pgft_min=5 vm_size=484 vm_rss=4 vm_swap=0 comm=modprobe cgroups=cpuset=/.cpu=/.cpuacct=/.io=/.memory=/.devices=/.freezer=/.net_cls=/.perf_eve... env=HOME=/.TERM=linux.PATH=/sbin:/usr/sbin:/bin:/usr/bin. tty=0 pgid=0 loginuid=-1 
16357 22:08:17.239829592 0 modprobe (10315) < execve res=0 exe=/sbin/modprobe args=-q.--.noop-iosched. tid=10315(modprobe) pid=10315(modprobe) ptid=204 cwd= fdlimit=1024 pgft_maj=0 pgft_min=4 vm_size=484 vm_rss=4 vm_swap=0 comm=modprobe cgroups=cpuset=/.cpu=/.cpuacct=/.io=/.memory=/.devices=/.freezer=/.net_cls=/.perf_eve... env=HOME=/.TERM=linux.PATH=/sbin:/usr/sbin:/bin:/usr/bin. tty=0 pgid=0 loginuid=-1 
28859 22:08:21.210490586 3 modprobe (10419) < execve res=0 exe=/sbin/modprobe args=-q.--.noop-iosched. tid=10419(modprobe) pid=10419(modprobe) ptid=204 cwd= fdlimit=1024 pgft_maj=0 pgft_min=4 vm_size=484 vm_rss=4 vm_swap=0 comm=modprobe cgroups=cpuset=/.cpu=/.cpuacct=/.io=/.memory=/.devices=/.freezer=/.net_cls=/.perf_eve... env=HOME=/.TERM=linux.PATH=/sbin:/usr/sbin:/bin:/usr/bin. tty=0 pgid=0 loginuid=-1 
38165 22:08:24.816319950 3 modprobe (10511) < execve res=0 exe=/sbin/modprobe args=-q.--.noop-iosched. tid=10511(modprobe) pid=10511(modprobe) ptid=204 cwd= fdlimit=1024 pgft_maj=0 pgft_min=4 vm_size=484 vm_rss=4 vm_swap=0 comm=modprobe cgroups=cpuset=/.cpu=/.cpuacct=/.io=/.memory=/.devices=/.freezer=/.net_cls=/.perf_eve... env=HOME=/.TERM=linux.PATH=/sbin:/usr/sbin:/bin:/usr/bin. tty=0 pgid=0 loginuid=-1 

Technically we could probably even use UMH_NO_WAIT just to be safe in case reading /bin/sh from disk triggers the same issue: i haven't been able to reproduce this particular case though.

@behlendorf
Copy link
Contributor Author

@loli10K thanks for verifying the fix. Just to be on the safe side I'd suggest we use UMH_NO_WAIT, would you like to open a PR against master with the change. Then we can get this resolved right away and the backport to 0.8 will be trivial. It may take a little while before this more disruptive change can be merged.

@loli10K
Copy link
Contributor

loli10K commented Sep 13, 2019

@behlendorf i shamefully stole part of your PR description and used it in #9321.

@behlendorf behlendorf force-pushed the remove-zfs_vdev_scheduler branch from f9a619c to e240739 Compare September 16, 2019 17:42
behlendorf added a commit to behlendorf/zfs that referenced this pull request Sep 16, 2019
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 can result in a system hang if the
usermodehelper does not return.  This is because it may be called
with the spa config lock held as a writter.  For example via the
zfs_ioc_pool_scan() -> spa_scan() -> spa_scan() -> vdev_reopen()
callpath.

Additionally, there's a reasonable argument that setting the elevator
is the resonsiblity of whatever software is being used to configure
the system.  Therefore, it's proposed that the zfs_vdev_elevator
be removed.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#8664
Issue openzfs#9317
@behlendorf behlendorf added Status: Code Review Needed Ready for review and testing and removed Status: Design Review Needed Architecture or design is under discussion labels Sep 18, 2019
@rlaager
Copy link
Member

rlaager commented Sep 19, 2019

Note: This PR entirely removes the module option. However, we
may instead want to leave it in place but disable it and update the
documentation accordingly. This would ensure that any systems
which are setting the module option are still able to load the kmod.

I don't use it personally, but I think it would be best to keep the option (doing nothing) for a while (e.g. all of 0.8.x), especially considering things like distro backports.

Copy link
Member

@rlaager rlaager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me from a read through. The issue of whether to keep the option is a design decision, so I'm marking this as an "Approve" rather than a "Request changes".

@beren12
Copy link
Contributor

beren12 commented Sep 21, 2019

I agree with leaving it, possibly even in 0.9x but print warning to logs and possibly somewhere in userspace if the option is set, mainly because it can create an unbootable system once it's removed. People like me use backports so if someone updates using a newly back ported 0.9 and reboots with the option set, the system won't come back. I guess it really depends on how verbose the warnings are and when 0.9 drops.

behlendorf added a commit to behlendorf/zfs that referenced this pull request Sep 23, 2019
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 2a0d418.

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.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#8664
Issue openzfs#9317
@behlendorf behlendorf force-pushed the remove-zfs_vdev_scheduler branch from e240739 to c1cdb9e Compare September 23, 2019 23:28
@behlendorf
Copy link
Contributor Author

Refreshed this PR. In the updated version nothing is removed, but a warning is printed when the module option is set and the documentation is updated accordingly so we can transition to removing this.

Copy link
Member

@rlaager rlaager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is definitely good. Is the next step to make it do nothing in 0.9?

@behlendorf
Copy link
Contributor Author

It's not critical. However, it would be nice if we could accelerate things a little bit and backport this warning to 0.8.x, then make it non-functional in the next major release, and remove it entirely in the one after.

@rlaager
Copy link
Member

rlaager commented Sep 24, 2019

That seems like a perfectly reasonable timeframe. Absolute worst case, if things get bad for a distro backport, they could always patch it back in.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 24, 2019
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 2a0d418.

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.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#8664
Issue openzfs#9317
@behlendorf behlendorf force-pushed the remove-zfs_vdev_scheduler branch from c1cdb9e to 848c37d Compare September 24, 2019 23:16
@behlendorf behlendorf merged commit f81d5ef into openzfs:master Sep 25, 2019
@behlendorf behlendorf deleted the remove-zfs_vdev_scheduler branch November 21, 2019 20:49
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
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 2a0d418.

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 <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#8664
Closes openzfs#9317
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
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 2a0d418.

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 <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#8664
Closes openzfs#9317
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
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 2a0d418.

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 <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #8664
Closes #9317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants