Skip to content

Commit ef10039

Browse files
YuKuai-huaweiaxboe
authored andcommitted
blk-throttle: print signed value 'carryover_bytes/ios' for user
'carryover_bytes/ios' can be negative, indicate that some bio is dispatched in advance within slice while configuration is updated. Print a huge value is not user-friendly. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20230816012708.1193747-2-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 6c1b980 commit ef10039

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

block/blk-throttle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ static void tg_update_carryover(struct throtl_grp *tg)
816816
__tg_update_carryover(tg, WRITE);
817817

818818
/* see comments in struct throtl_grp for meaning of these fields. */
819-
throtl_log(&tg->service_queue, "%s: %llu %llu %u %u\n", __func__,
819+
throtl_log(&tg->service_queue, "%s: %lld %lld %d %d\n", __func__,
820820
tg->carryover_bytes[READ], tg->carryover_bytes[WRITE],
821821
tg->carryover_ios[READ], tg->carryover_ios[WRITE]);
822822
}

block/blk-throttle.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ struct throtl_grp {
127127
* bytes/ios are waited already in previous configuration, and they will
128128
* be used to calculate wait time under new configuration.
129129
*/
130-
uint64_t carryover_bytes[2];
131-
unsigned int carryover_ios[2];
130+
long long carryover_bytes[2];
131+
int carryover_ios[2];
132132

133133
unsigned long last_check_time;
134134

0 commit comments

Comments
 (0)