-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change ZVOL to use _by_dnode() methods (#240)
* Make zvol operations use _by_dnode routines This continues what was started in 0eef1bde31d67091d3deed23fe2394f5a8bf2276 by fully converting zvols to avoid unnecessary dnode_hold() calls. This saves a small amount of CPU time and slightly improves latencies of operations on zvols. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #6058 Porting-notes: Cleaned up previous style, which was based on OSX. Since we can use the standard uio call, we should take advantage of that. Additionally deleted all the symlink code, as that is specific to OSX. Ported-by: Jorgen Lundman <[email protected]> * zvol_write() can use dmu_tx_hold_write_by_dnode() We can improve the performance of writes to zvols by using dmu_tx_hold_write_by_dnode() instead of dmu_tx_hold_write(). This reduces lock contention on the first block of the dnode object, and also reduces the amount of CPU needed. The benefit will be highest with multi-threaded async writes (i.e. writes that don't call zil_commit()). Signed-off-by: Matthew Ahrens <[email protected]> * Warn if volblocksize is smaller than async $ ./zfs create -s -V 3GB -b 2048 tank/vol Warning: volblocksize (2048) < ashift (12 / 4096) means all writes are amplified and space wasted. * Only sync zvol if sync=always Co-authored-by: Richard Yao <[email protected]> Co-authored-by: Matthew Ahrens <[email protected]>
- Loading branch information
1 parent
271ea63
commit fb5cd5b
Showing
6 changed files
with
176 additions
and
614 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
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.