• Jens Axboe's avatar
    [PATCH] misc elevator/block updates · bba7c645
    Jens Axboe authored
    I've got a new i/o scheduler in testing, some changes where needed in
    the block layer to accomodate it. Basically because right now
    assumptions are made about q->queue_head being the sort list. The
    changes in detail:
    
    o elevator_merge_requests_fn takes queue argument as well
    
    o __make_request() inits insert_here to NULL instead of
      q->queue_head.prev, which means that the i/o schedulers must
      explicitly check for this condition now.
    
    o incorporate elv_queue_empty(), it was just a place holder before
    
    o add elv_get_sort_head(). it returns the sort head of the elevator for
      a given request. attempt_{back,front}_merge uses it to determine
      whether a request is valid or not. Maybe attempt_{back,front}_merge
      should just be killed, I doubt they have much relevance with the wake
      up batching.
    
    o call the merge_cleanup functions of the elevator _after_ the merge has
      been done, not before. This way the elevator functions get the new
      state of the request, which is the most interesting.
    
    o Kill extra nr_sectors check in ll_merge_requests_fn()
    
    o bi->bi_bdev is always set in __make_request(), so kill check.
    bba7c645
elevator.c 10.5 KB