Enable /proc/diskstats for zvols

The /proc/diskstats accounting needs to be explicitly enabled
for block devices which do not use multi-queue.

Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12440
Closes #12066
This commit is contained in:
Brian Behlendorf 2021-08-05 14:35:34 -07:00 committed by Tony Hutter
parent c07ed69577
commit 32a971e749
1 changed files with 3 additions and 0 deletions

View File

@ -837,6 +837,9 @@ zvol_alloc(dev_t dev, const char *name)
/* Disable write merging in favor of the ZIO pipeline. */ /* Disable write merging in favor of the ZIO pipeline. */
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;