diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2009-05-20 11:50:34 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2009-06-24 05:27:01 -0400 |
commit | bc47df0fa705887242c26c7b040e7cf0170ab1f1 (patch) | |
tree | 5bd00f1f3561946dc3259994df1bb6248bdbc38a | |
parent | 2a13877c5ef3207a2a5c56250742e60808677f90 (diff) |
osdblk: Adjust queue limits to lower device's limits
call blk_queue_stack_limits() to copy queue limits from
the underline osd scsi_device. This is absolutely needed
because osdblk cannot sleep when allocating a lower-request and
therefore cannot be bouncing.
TODO: Dynamic changes of limits to the lower device queue
will not reflect in the upper driver
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
-rw-r--r-- | drivers/block/osdblk.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c index 3565d0dd123f..13c1aee6aa3f 100644 --- a/drivers/block/osdblk.c +++ b/drivers/block/osdblk.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <scsi/osd_initiator.h> | 66 | #include <scsi/osd_initiator.h> |
67 | #include <scsi/osd_attributes.h> | 67 | #include <scsi/osd_attributes.h> |
68 | #include <scsi/osd_sec.h> | 68 | #include <scsi/osd_sec.h> |
69 | #include <scsi/scsi_device.h> | ||
69 | 70 | ||
70 | #define DRV_NAME "osdblk" | 71 | #define DRV_NAME "osdblk" |
71 | #define PFX DRV_NAME ": " | 72 | #define PFX DRV_NAME ": " |
@@ -437,6 +438,12 @@ static int osdblk_init_disk(struct osdblk_device *osdev) | |||
437 | return rc; | 438 | return rc; |
438 | } | 439 | } |
439 | 440 | ||
441 | /* Set our limits to the lower device limits, because osdblk cannot | ||
442 | * sleep when allocating a lower-request and therefore cannot be | ||
443 | * bouncing. | ||
444 | */ | ||
445 | blk_queue_stack_limits(q, osd_request_queue(osdev->osd)); | ||
446 | |||
440 | blk_queue_prep_rq(q, blk_queue_start_tag); | 447 | blk_queue_prep_rq(q, blk_queue_start_tag); |
441 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, osdblk_prepare_flush); | 448 | blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, osdblk_prepare_flush); |
442 | 449 | ||