From e36f724b4ae70e443a7d152929b60059cbfa1a26 Mon Sep 17 00:00:00 2001 From: Mike Snitzer Date: Mon, 24 May 2010 09:07:32 +0200 Subject: [PATCH] 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 Signed-off-by: Jens Axboe --- block/elevator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/elevator.c b/block/elevator.c index 6df2b5056b51..0abce473d606 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -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;