aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index af0835187e76..b47259f6f39c 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1651,6 +1651,8 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
1651 sbi->s_inode_size); 1651 sbi->s_inode_size);
1652 goto failed_mount; 1652 goto failed_mount;
1653 } 1653 }
1654 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE)
1655 sb->s_time_gran = 1 << (EXT4_EPOCH_BITS - 2);
1654 } 1656 }
1655 sbi->s_frag_size = EXT4_MIN_FRAG_SIZE << 1657 sbi->s_frag_size = EXT4_MIN_FRAG_SIZE <<
1656 le32_to_cpu(es->s_log_frag_size); 1658 le32_to_cpu(es->s_log_frag_size);
@@ -1874,6 +1876,32 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
1874 } 1876 }
1875 1877
1876 ext4_setup_super (sb, es, sb->s_flags & MS_RDONLY); 1878 ext4_setup_super (sb, es, sb->s_flags & MS_RDONLY);
1879
1880 /* determine the minimum size of new large inodes, if present */
1881 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) {
1882 sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
1883 EXT4_GOOD_OLD_INODE_SIZE;
1884 if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
1885 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
1886 if (sbi->s_want_extra_isize <
1887 le16_to_cpu(es->s_want_extra_isize))
1888 sbi->s_want_extra_isize =
1889 le16_to_cpu(es->s_want_extra_isize);
1890 if (sbi->s_want_extra_isize <
1891 le16_to_cpu(es->s_min_extra_isize))
1892 sbi->s_want_extra_isize =
1893 le16_to_cpu(es->s_min_extra_isize);
1894 }
1895 }
1896 /* Check if enough inode space is available */
1897 if (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
1898 sbi->s_inode_size) {
1899 sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
1900 EXT4_GOOD_OLD_INODE_SIZE;
1901 printk(KERN_INFO "EXT4-fs: required extra inode space not"
1902 "available.\n");
1903 }
1904
1877 /* 1905 /*
1878 * akpm: core read_super() calls in here with the superblock locked. 1906 * akpm: core read_super() calls in here with the superblock locked.
1879 * That deadlocks, because orphan cleanup needs to lock the superblock 1907 * That deadlocks, because orphan cleanup needs to lock the superblock