From: Aleksei Zakharov Date: Mon, 11 Feb 2019 10:10:34 +0000 (+0300) Subject: block: avoid setting wbt_lat_usec to current value X-Git-Tag: v5.1-rc1~100^2~42 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b7143fe67bfc3b83a9e11371da659e1e70a1bbf3;p=linux.git block: avoid setting wbt_lat_usec to current value There's no reason to set wbt min lat and freeze request queue if current value is the same. Reviewed-by: Johannes Thumshirn Signed-off-by: Aleksei Zakharov Signed-off-by: Jens Axboe --- diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 94e1b052abbc..59685918167e 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -468,6 +468,9 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page, else if (val >= 0) val *= 1000ULL; + if (wbt_get_min_lat(q) == val) + return count; + /* * Ensure that the queue is idled, in case the latency update * ends up either enabling or disabling wbt completely. We can't