-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlocks resulting from the post-kmem rework merge
Put threads holding z_hold_mtx[i] under PF_STRANS to avoid lock inversions typically involving zfs_zinactive() and zfs_zget(). Use MUTEX_FSTRANS for db_mtx to avoid the following lock inversion: Process 1: dbuf_find() acquire hash_mutexes[i] wait for db_mtx Process 2: dbuf_dirty() acquire db_mtx <reclaim> zfs_zinactive() wait for z_hold_mtx[i] Process 3: <doing a zpl_lookup> zfs_zget() acquire z_hold_mtx[i] sa_buf_hold() ... dbuf_find() wait for hash_mutexes[i]
- Loading branch information
Showing
3 changed files
with
28 additions
and
10 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