block: move dma drain handling to scsi
Don't burden the common block code with with specifics of the libata DMA draining mechanism. Instead move most of the code to the scsi midlayer. That also means the nr_phys_segments adjustments in the blk-mq fast path can go away entirely, given that SCSI never looks at nr_phys_segments after mapping the request to a scatterlist. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
0475bd6c65
commit
cc97923a5b
@@ -270,6 +270,13 @@ struct scsi_host_template {
|
||||
*/
|
||||
int (* map_queues)(struct Scsi_Host *shost);
|
||||
|
||||
/*
|
||||
* Check if scatterlists need to be padded for DMA draining.
|
||||
*
|
||||
* Status: OPTIONAL
|
||||
*/
|
||||
bool (* dma_need_drain)(struct request *rq);
|
||||
|
||||
/*
|
||||
* This function determines the BIOS parameters for a given
|
||||
* harddisk. These tend to be numbers that are made up by
|
||||
|
Reference in New Issue
Block a user