-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-work management of the auto trim taskq...
... and related locking Don't take the spa_auto_trim_lock in the sync path: The auto trim taskq is now stopped and started in response to changes in the "autotrim" property asynchronously by the spa async task. If the spa_auto-trim_lock is taken in the sync task, the system can deadlock as follows: Non-sync context task: Acquires spa_auto_trim_lock via spa_vdev_enter() or some other path. Sync task: syncing a change to the "autotrim" property attempts to take spa_auto_trim_lock and blocks. Non-sync context task: blocks attempting to take a spa config lock which won't be released until the sync task completes. Deadlock. Also, since the auto trim taskq is now started asynchronously, it may not yet be ready yet when the sync task calls spa_auto_trim(). Modified spa_auto_trim so it will simply return if the taskq is not available yet (it will do its thing on the next pass). Also, avoid starting auto trim taskqs for the "import$" pseudo-pool. Also, don't attempt to create the taskq if a spa unload is in-progress.
- Loading branch information
Showing
3 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters