aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/osdblk.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-05-20 18:50:34 +0300
committerBoaz Harrosh <bharrosh@panasas.com>2009-06-24 12:27:01 +0300
commitbc47df0fa705887242c26c7b040e7cf0170ab1f1 (patch)
tree5bd00f1f3561946dc3259994df1bb6248bdbc38a /drivers/block/osdblk.c
parent2a13877c5ef3207a2a5c56250742e60808677f90 (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>
Diffstat (limited to 'drivers/block/osdblk.c')
-rw-r--r--drivers/block/osdblk.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
index 3565d0dd123..13c1aee6aa3 100644
--- a/drivers/block/osdblk.c
+++ b/drivers/block/osdblk.c
@@ -66,6 +66,7 @@
#include <scsi/osd_initiator.h>
#include <scsi/osd_attributes.h>
#include <scsi/osd_sec.h>
+#include <scsi/scsi_device.h>
#define DRV_NAME "osdblk"
#define PFX DRV_NAME ": "
@@ -437,6 +438,12 @@ static int osdblk_init_disk(struct osdblk_device *osdev)
return rc;
}
+ /* Set our limits to the lower device limits, because osdblk cannot
+ * sleep when allocating a lower-request and therefore cannot be
+ * bouncing.
+ */
+ blk_queue_stack_limits(q, osd_request_queue(osdev->osd));
+
blk_queue_prep_rq(q, blk_queue_start_tag);
blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH, osdblk_prepare_flush);