forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make callers responsible for memory allocation in zfs_range_lock()
zfs_range_lock() is used in zvols, and previously, it could deadlock due to an allocation using KM_SLEEP. We avoid this by moving responsibility the memory allocation from zfs_range_lock() to the caller. This enables us to avoid such deadlocks and use stack allocations, which are more efficient and prevents deadlocks. The contexts in which stack allocations are done do not appear to be stack heavy, so we do not risk overflowing the stack from doing this. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Conflicts: module/zfs/zvol.c
- Loading branch information
Showing
6 changed files
with
65 additions
and
62 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
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
Oops, something went wrong.