On Mon 13-06-22 09:32:34, Bart Van Assche wrote: > BFQ uses io_start_time_ns. That member variable is only set if I/O > statistics are enabled. Hence this patch that enables I/O statistics > at the time BFQ is associated with a request queue. > > Compile-tested only. > > Reported-by: Cixi Geng <cixi.geng1@xxxxxxxxxx> > Cc: Cixi Geng <cixi.geng1@xxxxxxxxxx> > Cc: Jan Kara <jack@xxxxxxx> > Cc: Yu Kuai <yukuai3@xxxxxxxxxx> > Cc: Paolo Valente <paolo.valente@xxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Looks good. Thanks for the fix. Feel free to add: Reviewed-by: Jan Kara <jack@xxxxxxx> Honza > --- > block/bfq-iosched.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c > index 0d46cb728bbf..519862d82473 100644 > --- a/block/bfq-iosched.c > +++ b/block/bfq-iosched.c > @@ -7046,6 +7046,7 @@ static void bfq_exit_queue(struct elevator_queue *e) > spin_unlock_irq(&bfqd->lock); > #endif > > + blk_stat_disable_accounting(bfqd->queue); > wbt_enable_default(bfqd->queue); > > kfree(bfqd); > @@ -7189,6 +7190,8 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_type *e) > bfq_init_entity(&bfqd->oom_bfqq.entity, bfqd->root_group); > > wbt_disable_default(q); > + blk_stat_enable_accounting(q); > + > return 0; > > out_free: -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR