diff options
author | John Gallagher <[email protected]> | 2019-05-04 16:39:10 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-05-04 16:39:10 -0700 |
commit | 1eacf2b3b0a1d3bccaab83dece44d671ba30292d (patch) | |
tree | 140234a8ef61731f95c5e766477be3ff27d0d061 /module/icp/Makefile.in | |
parent | b3b60984ee191bdbb00b91842053c83581854db7 (diff) |
Improve rate at which new zvols are processed
The kernel function which adds new zvols as disks to the system,
add_disk(), briefly opens and closes the zvol as part of its work.
Closing a zvol involves waiting for two txgs to sync. This, combined
with the fact that the taskq processing new zvols is single threaded,
makes this processing new zvols slow.
Waiting for these txgs to sync is only necessary if the zvol has been
written to, which is not the case during add_disk(). This change adds
tracking of whether a zvol has been written to so that we can skip the
txg_wait_synced() calls when they are unnecessary.
This change also fixes the flags passed to blkdev_get_by_path() by
vdev_disk_open() to be FMODE_READ | FMODE_WRITE | FMODE_EXCL instead of
just FMODE_EXCL. The flags were being incorrectly calculated because
we were using the wrong version of vdev_bdev_mode().
Reviewed-by: George Wilson <[email protected]>
Reviewed-by: Serapheim Dimitropoulos <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: John Gallagher <[email protected]>
Closes #8526
Closes #8615
Diffstat (limited to 'module/icp/Makefile.in')
0 files changed, 0 insertions, 0 deletions