Commit e36f724b4ae70e443a7d152929b60059cbfa1a26

Authored by Mike Snitzer
Committed by Jens Axboe
1 parent 80b15c7389

block: Adjust elv_iosched_show to return "none" for bio-based DM

Bio-based DM doesn't use an elevator (queue is !blk_queue_stackable()).

Longer-term DM will not allocate an elevator for bio-based DM.  But even
then there will be small potential for an elevator to be allocated for
a request-based DM table only to have a bio-based table be loaded in the
end.

Displaying "none" for bio-based DM will help avoid user confusion.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1097,7 +1097,7 @@
1097 1097 struct elevator_type *__e;
1098 1098 int len = 0;
1099 1099  
1100   - if (!q->elevator)
  1100 + if (!q->elevator || !blk_queue_stackable(q))
1101 1101 return sprintf(name, "none\n");
1102 1102  
1103 1103 elv = e->elevator_type;