Skip to content

Commit

Permalink
Enable /proc/diskstats for zvols
Browse files Browse the repository at this point in the history
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 openzfs#12440
Closes openzfs#12066
  • Loading branch information
behlendorf committed Aug 24, 2021
1 parent c54f874 commit 1030adf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/os/linux/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,9 @@ zvol_alloc(dev_t dev, const char *name)
/* Disable write merging in favor of the ZIO pipeline. */
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_dev = dev;
zv->zv_open_count = 0;
Expand Down

0 comments on commit 1030adf

Please sign in to comment.