aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zio.c
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2023-06-27 11:03:29 +1000
committerBrian Behlendorf <[email protected]>2024-07-29 17:05:08 -0700
commite26b3771ee43256a0347b7ec2503abbed7b5ecd5 (patch)
treeeb00d0570f2ada31f123ebcdf0a32648e7124172 /module/zfs/zio.c
parented87d456e4ebcd031d43c29b93d0a664581a51f7 (diff)
spa_preferred_class: pass the entire zio
Rather than picking out specific values out of the properties, just pass the entire zio in, to make it easier in the future to use more of that info to decide on the storage class. I would have rathered just pass io_prop in, but having spa.h include zio.h gets a bit tricky. Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: Klara, Inc. Sponsored-by: iXsystems, Inc. Closes #15894
Diffstat (limited to 'module/zfs/zio.c')
-rw-r--r--module/zfs/zio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index bc5a3c9b7..781011373 100644
--- a/module/zfs/zio.c
+++ b/module/zfs/zio.c
@@ -3637,8 +3637,7 @@ zio_dva_throttle(zio_t *zio)
metaslab_class_t *mc;
/* locate an appropriate allocation class */
- mc = spa_preferred_class(spa, zio->io_size, zio->io_prop.zp_type,
- zio->io_prop.zp_level, zio->io_prop.zp_zpl_smallblk);
+ mc = spa_preferred_class(spa, zio);
if (zio->io_priority == ZIO_PRIORITY_SYNC_WRITE ||
!mc->mc_alloc_throttle_enabled ||
@@ -3710,9 +3709,7 @@ zio_dva_allocate(zio_t *zio)
*/
mc = zio->io_metaslab_class;
if (mc == NULL) {
- mc = spa_preferred_class(spa, zio->io_size,
- zio->io_prop.zp_type, zio->io_prop.zp_level,
- zio->io_prop.zp_zpl_smallblk);
+ mc = spa_preferred_class(spa, zio);
zio->io_metaslab_class = mc;
}