Code cleanups

- Allocate ve_search on the stack, so we avoid allocating memory for
  every I/O even if the VDEV cache is disabled.
- Reduce lock scope.
- Avoid locking in vdev_cache_read() when the VDEV cache is disabled.
- Sort file names properly.
- Correct comment.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #12749
This commit is contained in:
Pawel Jakub Dawidek
2021-11-30 10:32:38 -08:00
committed by GitHub
parent cfc62062ae
commit 547df81641
5 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -408,7 +408,7 @@ vdev_queue_class_max_active(spa_t *spa, vdev_queue_t *vq, zio_priority_t p)
}
/*
* Return the i/o class to issue from, or ZIO_PRIORITY_MAX_QUEUEABLE if
* Return the i/o class to issue from, or ZIO_PRIORITY_NUM_QUEUEABLE if
* there is no eligible class.
*/
static zio_priority_t