lkml.org 
[lkml]   [2022]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 4/6] blk-wbt: don't show valid wbt_lat_usec in sysfs while wbt is disabled
>  static ssize_t queue_wb_lat_show(struct request_queue *q, char *page)
> {
> + u64 lat;
> +
> if (!wbt_rq_qos(q))
> return -EINVAL;
>
> - return sprintf(page, "%llu\n", div_u64(wbt_get_min_lat(q), 1000));
> + lat = wbt_disabled(q) ? 0 : div_u64(wbt_get_min_lat(q), 1000);
> +
> + return sprintf(page, "%llu\n", lat);

if (wbt_disabled(q))
return sprintf(page, "0\n");
return sprintf(page, "%llu\n", div_u64(wbt_get_min_lat(q), 1000));

but otherwise the patch looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2022-10-18 17:52    [W:0.167 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site