aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2007-12-04 10:09:03 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-12-04 10:09:57 -0500
commit436d1bc7fe6e78e37fe5f5022ea4d5c133d825eb (patch)
treed2363a3489a98a3325114a253bef4dc13be3885e /drivers
parent671756162cfb0b3ccbb6a0047baa3010885561a2 (diff)
[S390] dcssblk: prevent early access without own make_request function
When loading a dcss segment with the dcssblk driver, sometimes the following kind of message appears: bio too big device dcssblk0 (8 > 0) Buffer I/O error on device dcssblk0, logical block 172016 .. The fix is to move the disk registration after setting the make_request function, to avoid calls into generic_make_request for dcssblock without having the make_request function set up properly. Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/dcssblk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 5e083d1f57e7..15a5789b7734 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -472,11 +472,11 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
472 if (rc) 472 if (rc)
473 goto unregister_dev; 473 goto unregister_dev;
474 474
475 add_disk(dev_info->gd);
476
477 blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request); 475 blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
478 blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096); 476 blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);
479 477
478 add_disk(dev_info->gd);
479
480 switch (dev_info->segment_type) { 480 switch (dev_info->segment_type) {
481 case SEG_TYPE_SR: 481 case SEG_TYPE_SR:
482 case SEG_TYPE_ER: 482 case SEG_TYPE_ER: