aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs/zvol_os.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2021-08-05 14:35:34 -0700
committerGitHub <[email protected]>2021-08-05 15:35:34 -0600
commitae1e40b3291149046d9ced3b19c774da6b30594d (patch)
treedce681659ebdf04bdb419ab84f05d736789ddf37 /module/os/linux/zfs/zvol_os.c
parente1870be450495b7607ddbf2746a67f0219d1504c (diff)
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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #12440 Closes #12066
Diffstat (limited to 'module/os/linux/zfs/zvol_os.c')
-rw-r--r--module/os/linux/zfs/zvol_os.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index 8b29d73a3..c17423426 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -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;