]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] rd.c blocksize handling
authorAlexander Viro <viro@math.psu.edu>
Wed, 22 May 2002 04:13:14 +0000 (21:13 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 22 May 2002 04:13:14 +0000 (21:13 -0700)
Unlike other drivers, rd.c wants block size to be set once an
forever (for everybody else setting block size as high as possible and
letting filesystems change it with set_blocksize() is OK; rd.c treats
invalidate_buffers() as "kill the ramdisk contents".

drivers/block/rd.c

index e2b22a17629b34ad8702ddee1fc512f4c30c53df..e097052c53762c437328c721bced0300719fd0a5 100644 (file)
@@ -376,6 +376,7 @@ static int rd_open(struct inode * inode, struct file * filp)
        if (rd_bdev[unit] == NULL) {
                rd_bdev[unit] = bdget(kdev_t_to_nr(inode->i_rdev));
                rd_bdev[unit]->bd_openers++;
+               rd_bdev[unit]->bd_block_size = rd_blocksize;
                rd_bdev[unit]->bd_inode->i_mapping->a_ops = &ramdisk_aops;
        }