Skip to content

Commit

Permalink
[S390] dcssblk: prevent early access without own make_request function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Borntraeger authored and Martin Schwidefsky committed Dec 4, 2007
1 parent 6717561 commit 436d1bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/block/dcssblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,11 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
if (rc)
goto unregister_dev;

add_disk(dev_info->gd);

blk_queue_make_request(dev_info->dcssblk_queue, dcssblk_make_request);
blk_queue_hardsect_size(dev_info->dcssblk_queue, 4096);

add_disk(dev_info->gd);

switch (dev_info->segment_type) {
case SEG_TYPE_SR:
case SEG_TYPE_ER:
Expand Down

0 comments on commit 436d1bc

Please sign in to comment.