aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zstreamdump/zstreamdump.c
diff options
context:
space:
mode:
authorJohn Gallagher <[email protected]>2019-05-04 16:39:10 -0700
committerBrian Behlendorf <[email protected]>2019-05-04 16:39:10 -0700
commit1eacf2b3b0a1d3bccaab83dece44d671ba30292d (patch)
tree140234a8ef61731f95c5e766477be3ff27d0d061 /cmd/zstreamdump/zstreamdump.c
parentb3b60984ee191bdbb00b91842053c83581854db7 (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 'cmd/zstreamdump/zstreamdump.c')
0 files changed, 0 insertions, 0 deletions