lkml.org 
[lkml]   [2002]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] fix for initrd breakage in 2.5.13+
Date
From
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 */
\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.221 / U:1.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site