Skip to content

Commit

Permalink
Linux 6.11: IO stats is now a queue feature flag
Browse files Browse the repository at this point in the history
Apply them with with the rest of the settings.

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/
Closes openzfs#16400
  • Loading branch information
robn authored and lundman committed Sep 4, 2024
1 parent bdeebfd commit b72b372
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions module/os/linux/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,8 @@ zvol_queue_limits_convert(zvol_queue_limits_t *limits,
qlimits->max_segment_size = limits->zql_max_segment_size;
qlimits->io_opt = limits->zql_io_opt;
#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
Expand All @@ -1220,6 +1221,7 @@ zvol_queue_limits_apply(zvol_queue_limits_t *limits,
blk_queue_io_opt(queue, limits->zql_io_opt);
#ifndef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES
blk_queue_set_write_cache(queue, B_TRUE);
blk_queue_flag_set(QUEUE_FLAG_IO_STAT, queue);
#endif
}

Expand Down Expand Up @@ -1409,9 +1411,6 @@ zvol_alloc(dev_t dev, const char *name)
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 b72b372

Please sign in to comment.