Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77913
b: refs/heads/master
c: ce40733
h: refs/heads/master
i:
  77911: c115517
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Jan 29, 2008
1 parent d338e05 commit 7247b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb45bbe44b09f35bb12d67ffa7ecff862608aeae
refs/heads/master: ce40733ce93de402ed629762f0e912d9af187cef
15 changes: 5 additions & 10 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,6 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
unsigned long def_mount_opts;
struct inode *root;
int blocksize;
int hblock;
int db_count;
int i;
int needs_recovery;
Expand Down Expand Up @@ -1969,20 +1968,16 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
goto failed_mount;
}

hblock = bdev_hardsect_size(sb->s_bdev);
if (sb->s_blocksize != blocksize) {
/*
* Make sure the blocksize for the filesystem is larger
* than the hardware sectorsize for the machine.
*/
if (blocksize < hblock) {
printk(KERN_ERR "EXT4-fs: blocksize %d too small for "
"device blocksize %d.\n", blocksize, hblock);

/* Validate the filesystem blocksize */
if (!sb_set_blocksize(sb, blocksize)) {
printk(KERN_ERR "EXT4-fs: bad block size %d.\n",
blocksize);
goto failed_mount;
}

brelse (bh);
sb_set_blocksize(sb, blocksize);
logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = do_div(logical_sb_block, blocksize);
bh = sb_bread(sb, logical_sb_block);
Expand Down

0 comments on commit 7247b07

Please sign in to comment.