blk-throttle: Use readable READ/WRITE macros
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Mon, 7 Sep 2020 08:10:14 +0000 (16:10 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Sep 2020 01:36:54 +0000 (19:36 -0600)
Use readable READ/WRITE macros instead of magic numbers.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c

index 2fc6c3e..06e73ed 100644 (file)
@@ -1428,8 +1428,8 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
         * that a group's limit are dropped suddenly and we don't want to
         * account recently dispatched IO with new low rate.
         */
-       throtl_start_new_slice(tg, 0);
-       throtl_start_new_slice(tg, 1);
+       throtl_start_new_slice(tg, READ);
+       throtl_start_new_slice(tg, WRITE);
 
        if (tg->flags & THROTL_TG_PENDING) {
                tg_update_disptime(tg);