slice_resid can be both positive and negative. Commit
bc5240ca5bc1
(cfq-iosched: Convert from jiffies to nanoseconds) converted it from
long to u64. Although this did not introduce any functional regression
(the operations just overflow and the result was fine), it is certainly
wrong and could cause issues in future. So convert the type to more
appropriate s64.
Fixes: bc5240ca5bc1c224de225212da9f8378fd604e99
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
/* time when first request from queue completed and slice started. */
u64 slice_start;
u64 slice_end;
- u64 slice_resid;
+ s64 slice_resid;
/* pending priority requests */
int prio_pending;
cfqq->slice_resid = cfq_scaled_cfqq_slice(cfqd, cfqq);
else
cfqq->slice_resid = cfqq->slice_end - ktime_get_ns();
- cfq_log_cfqq(cfqd, cfqq, "resid=%llu", cfqq->slice_resid);
+ cfq_log_cfqq(cfqd, cfqq, "resid=%lld", cfqq->slice_resid);
}
cfq_group_served(cfqd, cfqq->cfqg, cfqq);