mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[SCSI] Convert SCSI mid-layer to scsi_execute_async
Add scsi helpers to create really-large-requests and convert scsi-ml to scsi_execute_async(). Per Jens's previous comments, I placed this function in scsi_lib.c. I made it follow all the queue's limits - I think I did at least :), so I removed the warning on the function header. I think the scsi_execute_* functions should eventually take a request_queue and be placed some place where the dm-multipath hw_handler can use them if that failover code is going to stay in the kernel. That conversion patch will be sent in another mail though. Signed-off-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
6e39b69e7e
commit
6e68af666f
6 changed files with 233 additions and 73 deletions
20
fs/bio.c
20
fs/bio.c
|
|
@ -385,6 +385,25 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page
|
|||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* bio_add_pc_page - attempt to add page to bio
|
||||
* @bio: destination bio
|
||||
* @page: page to add
|
||||
* @len: vec entry length
|
||||
* @offset: vec entry offset
|
||||
*
|
||||
* Attempt to add a page to the bio_vec maplist. This can fail for a
|
||||
* number of reasons, such as the bio being full or target block
|
||||
* device limitations. The target block device must allow bio's
|
||||
* smaller than PAGE_SIZE, so it is always possible to add a single
|
||||
* page to an empty bio. This should only be used by REQ_PC bios.
|
||||
*/
|
||||
int bio_add_pc_page(request_queue_t *q, struct bio *bio, struct page *page,
|
||||
unsigned int len, unsigned int offset)
|
||||
{
|
||||
return __bio_add_page(q, bio, page, len, offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* bio_add_page - attempt to add page to bio
|
||||
* @bio: destination bio
|
||||
|
|
@ -1228,6 +1247,7 @@ EXPORT_SYMBOL(bio_clone);
|
|||
EXPORT_SYMBOL(bio_phys_segments);
|
||||
EXPORT_SYMBOL(bio_hw_segments);
|
||||
EXPORT_SYMBOL(bio_add_page);
|
||||
EXPORT_SYMBOL(bio_add_pc_page);
|
||||
EXPORT_SYMBOL(bio_get_nr_vecs);
|
||||
EXPORT_SYMBOL(bio_map_user);
|
||||
EXPORT_SYMBOL(bio_unmap_user);
|
||||
|
|
|
|||
Loading…
Reference in a new issue