• Tejun Heo's avatar
    block: remove duplicate or unused barrier/discard error paths · a7384677
    Tejun Heo authored
    * 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: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    a7384677
blk-barrier.c 9.05 KB