diff options
author | Tejun Heo <tj@kernel.org> | 2008-11-28 13:32:03 +0900 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-29 08:28:44 +0100 |
commit | a7384677b2f4cd40948fd7ce024ba5e1821444ba (patch) | |
tree | 679af09dde4d2659bc6a7dcd1d3dc34752899fa6 /block/blk-barrier.c | |
parent | 313e42999dbc0f234ca5909a236f78f082cb43b1 (diff) | |
download | linux-a7384677b2f4cd40948fd7ce024ba5e1821444ba.tar.gz linux-a7384677b2f4cd40948fd7ce024ba5e1821444ba.tar.bz2 linux-a7384677b2f4cd40948fd7ce024ba5e1821444ba.zip |
block: remove duplicate or unused barrier/discard error paths
* Because barrier mode can be changed dynamically, whether barrier is
supported or not can be determined only when actually issuing the
barrier and there is no point in checking it earlier. Drop barrier
support check in generic_make_request() and __make_request(), and
update comment around the support check in blk_do_ordered().
* There is no reason to check discard support in both
generic_make_request() and __make_request(). Drop the check in
__make_request(). While at it, move error action block to the end
of the function and add unlikely() to q existence test.
* Barrier request, be it empty or not, is never passed to low level
driver and thus it's meaningless to try to copy back req->sector to
bio->bi_sector on error. In addition, the notion of failed sector
doesn't make any sense for empty barrier to begin with. Drop the
code block from __end_that_request_first().
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r-- | block/blk-barrier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 1d7adc72c95d..43d479a1e664 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c @@ -216,8 +216,8 @@ int blk_do_ordered(struct request_queue *q, struct request **rqp) return 1; } else { /* - * This can happen when the queue switches to - * ORDERED_NONE while this request is on it. + * Queue ordering not supported. Terminate + * with prejudice. */ elv_dequeue_request(q, rq); if (__blk_end_request(rq, -EOPNOTSUPP, |