• Jens Axboe's avatar
    [PATCH] make queue prep_rq_fn() a bit more powerful · 0717c0a9
    Jens Axboe authored
    Extend q->prep_rq_fn() to return one of three values:
    
     o BLKPREP_OK: request is good, return it
     o BLKPREP_KILL: request is bad, end it completely
     o BLKPREP_DEFER: request is good, but we can't take it now
    
    We maintain compatability with old prep functions (if any, outside of
    ide-cd). This change is needed or SCSI to use prep function for command
    init, if sg table allocation fails we can just defer the request.
    0717c0a9
elevator.c 8.42 KB