Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`zvol_disk_open()` waits for up to `zfs_vdev_open_timeout_ms` (1 second by default) (e.g. if the block device does not exist). While in this loop, it calls `schedule_timeout()`. The problem is that `schedule_timeout()` may not actually cause the thread to go off-CPU. Per the "documentation" (comment in the source code): ``` * The function behavior depends on the current task state: * %TASK_RUNNING - the scheduler is called, but the task does not sleep * at all. That happens because sched_submit_work() does nothing for * tasks in %TASK_RUNNING state. ``` In my experience, `schedule_timeout()` never sleeps from this code path. This is especially noticeable if `zfs_vdev_open_timeout_ms` has been increased from its default. This commit uses `msleep()` to actually sleep. Note that this is how it was before openzfs#7629. Signed-off-by: Matthew Ahrens <[email protected]>
- Loading branch information