Linux 6.11: IO stats is now a queue feature flag

Apply them with with the rest of the settings.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #16400
This commit is contained in:
Rob Norris 2024-07-31 14:48:58 +10:00 committed by Tony Hutter
parent 464747ffd3
commit 11de432c8b
1 changed files with 3 additions and 4 deletions

View File

@ -1160,7 +1160,8 @@ zvol_queue_limits_convert(zvol_queue_limits_t *limits,
qlimits->max_segment_size = limits->zql_max_segment_size; qlimits->max_segment_size = limits->zql_max_segment_size;
qlimits->io_opt = limits->zql_io_opt; qlimits->io_opt = limits->zql_io_opt;
#ifdef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES #ifdef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES
qlimits->features = BLK_FEAT_WRITE_CACHE | BLK_FEAT_FUA; qlimits->features =
BLK_FEAT_WRITE_CACHE | BLK_FEAT_FUA | BLK_FEAT_IO_STAT;
#endif #endif
} }
#else #else
@ -1174,6 +1175,7 @@ zvol_queue_limits_apply(zvol_queue_limits_t *limits,
blk_queue_io_opt(queue, limits->zql_io_opt); blk_queue_io_opt(queue, limits->zql_io_opt);
#ifndef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES #ifndef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES
blk_queue_set_write_cache(queue, B_TRUE); blk_queue_set_write_cache(queue, B_TRUE);
blk_queue_flag_set(QUEUE_FLAG_IO_STAT, queue);
#endif #endif
} }
#endif #endif
@ -1362,9 +1364,6 @@ zvol_alloc(dev_t dev, const char *name)
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, zso->zvo_queue); blk_queue_flag_set(QUEUE_FLAG_NOMERGES, zso->zvo_queue);
} }
/* Enable /proc/diskstats */
blk_queue_flag_set(QUEUE_FLAG_IO_STAT, zso->zvo_queue);
zso->zvo_queue->queuedata = zv; zso->zvo_queue->queuedata = zv;
zso->zvo_dev = dev; zso->zvo_dev = dev;
zv->zv_open_count = 0; zv->zv_open_count = 0;