super.c (9f4813b531a0b8cc502fcfb142937fe4e9104d77) | super.c (4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/ext4/super.c 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 2091 unchanged lines hidden (view full) --- 2100 2101 if (!sbi->s_jquota_fmt) { 2102 ext4_msg(sb, KERN_ERR, "journaled quota format " 2103 "not specified"); 2104 return 0; 2105 } 2106 } 2107#endif | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * linux/fs/ext4/super.c 4 * 5 * Copyright (C) 1992, 1993, 1994, 1995 6 * Remy Card (card@masi.ibp.fr) 7 * Laboratoire MASI - Institut Blaise Pascal 8 * Universite Pierre et Marie Curie (Paris VI) --- 2091 unchanged lines hidden (view full) --- 2100 2101 if (!sbi->s_jquota_fmt) { 2102 ext4_msg(sb, KERN_ERR, "journaled quota format " 2103 "not specified"); 2104 return 0; 2105 } 2106 } 2107#endif |
2108 if (test_opt(sb, DIOREAD_NOLOCK)) { 2109 int blocksize = 2110 BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); 2111 2112 if (blocksize < PAGE_SIZE) { 2113 ext4_msg(sb, KERN_ERR, "can't mount with " 2114 "dioread_nolock if block size != PAGE_SIZE"); 2115 return 0; 2116 } 2117 } | |
2118 return 1; 2119} 2120 2121static inline void ext4_show_quota_options(struct seq_file *seq, 2122 struct super_block *sb) 2123{ 2124#if defined(CONFIG_QUOTA) 2125 struct ext4_sb_info *sbi = EXT4_SB(sb); --- 1424 unchanged lines hidden (view full) --- 3550 free_page((unsigned long) buf); 3551 return 0; 3552} 3553 3554static void ext4_clamp_want_extra_isize(struct super_block *sb) 3555{ 3556 struct ext4_sb_info *sbi = EXT4_SB(sb); 3557 struct ext4_super_block *es = sbi->s_es; | 2108 return 1; 2109} 2110 2111static inline void ext4_show_quota_options(struct seq_file *seq, 2112 struct super_block *sb) 2113{ 2114#if defined(CONFIG_QUOTA) 2115 struct ext4_sb_info *sbi = EXT4_SB(sb); --- 1424 unchanged lines hidden (view full) --- 3540 free_page((unsigned long) buf); 3541 return 0; 3542} 3543 3544static void ext4_clamp_want_extra_isize(struct super_block *sb) 3545{ 3546 struct ext4_sb_info *sbi = EXT4_SB(sb); 3547 struct ext4_super_block *es = sbi->s_es; |
3548 unsigned def_extra_isize = sizeof(struct ext4_inode) - 3549 EXT4_GOOD_OLD_INODE_SIZE; |
|
3558 | 3550 |
3559 /* determine the minimum size of new large inodes, if present */ 3560 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE && 3561 sbi->s_want_extra_isize == 0) { 3562 sbi->s_want_extra_isize = sizeof(struct ext4_inode) - 3563 EXT4_GOOD_OLD_INODE_SIZE; | 3551 if (sbi->s_inode_size == EXT4_GOOD_OLD_INODE_SIZE) { 3552 sbi->s_want_extra_isize = 0; 3553 return; 3554 } 3555 if (sbi->s_want_extra_isize < 4) { 3556 sbi->s_want_extra_isize = def_extra_isize; |
3564 if (ext4_has_feature_extra_isize(sb)) { 3565 if (sbi->s_want_extra_isize < 3566 le16_to_cpu(es->s_want_extra_isize)) 3567 sbi->s_want_extra_isize = 3568 le16_to_cpu(es->s_want_extra_isize); 3569 if (sbi->s_want_extra_isize < 3570 le16_to_cpu(es->s_min_extra_isize)) 3571 sbi->s_want_extra_isize = 3572 le16_to_cpu(es->s_min_extra_isize); 3573 } 3574 } 3575 /* Check if enough inode space is available */ | 3557 if (ext4_has_feature_extra_isize(sb)) { 3558 if (sbi->s_want_extra_isize < 3559 le16_to_cpu(es->s_want_extra_isize)) 3560 sbi->s_want_extra_isize = 3561 le16_to_cpu(es->s_want_extra_isize); 3562 if (sbi->s_want_extra_isize < 3563 le16_to_cpu(es->s_min_extra_isize)) 3564 sbi->s_want_extra_isize = 3565 le16_to_cpu(es->s_min_extra_isize); 3566 } 3567 } 3568 /* Check if enough inode space is available */ |
3576 if (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > 3577 sbi->s_inode_size) { 3578 sbi->s_want_extra_isize = sizeof(struct ext4_inode) - 3579 EXT4_GOOD_OLD_INODE_SIZE; | 3569 if ((sbi->s_want_extra_isize > sbi->s_inode_size) || 3570 (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > 3571 sbi->s_inode_size)) { 3572 sbi->s_want_extra_isize = def_extra_isize; |
3580 ext4_msg(sb, KERN_INFO, 3581 "required extra inode space not available"); 3582 } 3583} 3584 3585static void ext4_set_resv_clusters(struct super_block *sb) 3586{ 3587 ext4_fsblk_t resv_clusters; --- 2617 unchanged lines hidden --- | 3573 ext4_msg(sb, KERN_INFO, 3574 "required extra inode space not available"); 3575 } 3576} 3577 3578static void ext4_set_resv_clusters(struct super_block *sb) 3579{ 3580 ext4_fsblk_t resv_clusters; --- 2617 unchanged lines hidden --- |