Messages in this thread Patch in this message | | | Subject | [PATCH] initrd fails again in 2.5.18 | Date | Mon, 27 May 2002 18:56:27 -0400 | From | James Bottomley <> |
| |
The initial ramdisk fails to work with a slew of errors like:
generic_make_request: Trying to access nonexistent block-device 01:00 (2)
The problem was caused by change
kdev_t -> bdev cleanups [2/2]
which took out the ability of bdev_get_queue() to create a queue if one didn't already exist for the device. The functionality was moved to block_dev.c:do_open() where it exists within the if(!bdev->bd_openers) which the ramdisk never gets to.
The (tested) fix, I think, is to set bd_queue as part of ramdisk initialisation, which is what the attached patch does.
James Bottomley
===== drivers/block/rd.c 1.38 vs edited ===== --- 1.38/drivers/block/rd.c Thu May 23 08:18:38 2002 +++ edited/drivers/block/rd.c Mon May 27 17:11:40 2002 @@ -379,6 +379,7 @@ rd_bdev[unit]->bd_openers++; rd_bdev[unit]->bd_block_size = rd_blocksize; rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops; + rd_bdev[unit]->bd_queue = BLK_DEFAULT_QUEUE(MAJOR_NR); } return 0; | |