Skip to content

Commit

Permalink
block: Adjust elv_iosched_show to return "none" for bio-based DM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Snitzer authored and Jens Axboe committed May 24, 2010
1 parent 80b15c7 commit e36f724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ ssize_t elv_iosched_show(struct request_queue *q, char *name)
struct elevator_type *__e;
int len = 0;

if (!q->elevator)
if (!q->elevator || !blk_queue_stackable(q))
return sprintf(name, "none\n");

elv = e->elevator_type;
Expand Down

0 comments on commit e36f724

Please sign in to comment.