diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2005-11-11 06:30:27 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-14 22:03:35 -0500 |
commit | 6e68af666f5336254b5715dca591026b7324499a (patch) | |
tree | 5640209b6e2b75659149460f14531cfecffe2f5d /fs/bio.c | |
parent | 6e39b69e7ea9205c5f80aeac3ef999ab8fb1a4cc (diff) |
[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 <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -386,6 +386,25 @@ static int __bio_add_page(request_queue_t *q, struct bio *bio, struct page | |||
386 | } | 386 | } |
387 | 387 | ||
388 | /** | 388 | /** |
389 | * bio_add_pc_page - attempt to add page to bio | ||
390 | * @bio: destination bio | ||
391 | * @page: page to add | ||
392 | * @len: vec entry length | ||
393 | * @offset: vec entry offset | ||
394 | * | ||
395 | * Attempt to add a page to the bio_vec maplist. This can fail for a | ||
396 | * number of reasons, such as the bio being full or target block | ||
397 | * device limitations. The target block device must allow bio's | ||
398 | * smaller than PAGE_SIZE, so it is always possible to add a single | ||
399 | * page to an empty bio. This should only be used by REQ_PC bios. | ||
400 | */ | ||
401 | int bio_add_pc_page(request_queue_t *q, struct bio *bio, struct page *page, | ||
402 | unsigned int len, unsigned int offset) | ||
403 | { | ||
404 | return __bio_add_page(q, bio, page, len, offset); | ||
405 | } | ||
406 | |||
407 | /** | ||
389 | * bio_add_page - attempt to add page to bio | 408 | * bio_add_page - attempt to add page to bio |
390 | * @bio: destination bio | 409 | * @bio: destination bio |
391 | * @page: page to add | 410 | * @page: page to add |
@@ -1228,6 +1247,7 @@ EXPORT_SYMBOL(bio_clone); | |||
1228 | EXPORT_SYMBOL(bio_phys_segments); | 1247 | EXPORT_SYMBOL(bio_phys_segments); |
1229 | EXPORT_SYMBOL(bio_hw_segments); | 1248 | EXPORT_SYMBOL(bio_hw_segments); |
1230 | EXPORT_SYMBOL(bio_add_page); | 1249 | EXPORT_SYMBOL(bio_add_page); |
1250 | EXPORT_SYMBOL(bio_add_pc_page); | ||
1231 | EXPORT_SYMBOL(bio_get_nr_vecs); | 1251 | EXPORT_SYMBOL(bio_get_nr_vecs); |
1232 | EXPORT_SYMBOL(bio_map_user); | 1252 | EXPORT_SYMBOL(bio_map_user); |
1233 | EXPORT_SYMBOL(bio_unmap_user); | 1253 | EXPORT_SYMBOL(bio_unmap_user); |