Messages in this thread Patch in this message | | | Subject | Re: [PATCH] fix for initrd breakage in 2.5.13+ | Date | Wed, 15 May 2002 15:35:28 -0400 | From | James Bottomley <> |
| |
rmk@arm.linux.org.uk said: > --- drivers/block/rd.c Fri May 3 03:26:05 2002 +++ /tmp/rd.c Mon May > 6 03:00:00 2002 @@ -376,6 +376,7 @@ > rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev)); > rd_bdev[unit]->bd_openers++; > rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops; > + rd_bdev[unit]->bd_block_size = rd_blocksize; > } > return 0;
Ah Thanks!. Yes, that's the bit I was looking for. It also explains why bd_openers was already incremented.
I think you still need to set the block queue hardsect size correctly as well, so the final fix for the initrd problems should be the attached (which works for me).
James
# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.513 -> 1.514 # drivers/block/rd.c 1.35 -> 1.36 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/05/15 jejb@mulgrave.(none) 1.514 # rd.c blocksize fix # -------------------------------------------- # diff -Nru a/drivers/block/rd.c b/drivers/block/rd.c --- a/drivers/block/rd.c Wed May 15 15:21:55 2002 +++ b/drivers/block/rd.c Wed May 15 15:21:55 2002 @@ -376,6 +376,7 @@ rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev)); rd_bdev[unit]->bd_openers++; rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops; + rd_bdev[unit]->bd_block_size = rd_blocksize; } return 0; @@ -424,6 +425,7 @@ } blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), &rd_make_request); + blk_queue_hardsect_size(BLK_DEFAULT_QUEUE(MAJOR_NR), rd_blocksize); for (i = 0; i < NUM_RAMDISKS; i++) { /* rd_size is given in kB */ | |