Lines Matching refs:es

73 					struct ext4_super_block *es);
75 struct ext4_super_block *es);
267 struct ext4_super_block *es) in ext4_verify_csum_type() argument
272 return es->s_checksum_type == EXT4_CRC32C_CHKSUM; in ext4_verify_csum_type()
276 struct ext4_super_block *es) in ext4_superblock_csum() argument
282 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
288 struct ext4_super_block *es) in ext4_superblock_csum_verify() argument
293 return es->s_checksum == ext4_superblock_csum(sb, es); in ext4_superblock_csum_verify()
298 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_superblock_csum_set() local
303 es->s_checksum = ext4_superblock_csum(sb, es); in ext4_superblock_csum_set()
430 #define ext4_update_tstamp(es, tstamp) \ argument
431 __ext4_update_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi, \
433 #define ext4_get_tstamp(es, tstamp) \ argument
434 __ext4_get_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
1075 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_update_dynamic_rev() local
1077 if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV) in ext4_update_dynamic_rev()
1085 es->s_first_ino = cpu_to_le32(EXT4_GOOD_OLD_FIRST_INO); in ext4_update_dynamic_rev()
1086 es->s_inode_size = cpu_to_le16(EXT4_GOOD_OLD_INODE_SIZE); in ext4_update_dynamic_rev()
1087 es->s_rev_level = cpu_to_le32(EXT4_DYNAMIC_REV); in ext4_update_dynamic_rev()
1190 struct ext4_super_block *es = sbi->s_es; in ext4_put_super() local
1236 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_put_super()
1845 ext4_sb_read_encoding(const struct ext4_super_block *es) in ext4_sb_read_encoding() argument
1847 __u16 magic = le16_to_cpu(es->s_encoding); in ext4_sb_read_encoding()
2895 struct ext4_super_block *es = sbi->s_es; in _ext4_show_options() local
2921 le16_to_cpu(es->s_def_resuid) != EXT4_DEF_RESUID) in _ext4_show_options()
2925 le16_to_cpu(es->s_def_resgid) != EXT4_DEF_RESGID) in _ext4_show_options()
2928 def_errors = nodefs ? -1 : le16_to_cpu(es->s_errors); in _ext4_show_options()
3009 static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, in ext4_setup_super() argument
3015 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { in ext4_setup_super()
3030 else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 && in ext4_setup_super()
3031 le16_to_cpu(es->s_mnt_count) >= in ext4_setup_super()
3032 (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
3036 else if (le32_to_cpu(es->s_checkinterval) && in ext4_setup_super()
3037 (ext4_get_tstamp(es, s_lastcheck) + in ext4_setup_super()
3038 le32_to_cpu(es->s_checkinterval) <= ktime_get_real_seconds())) in ext4_setup_super()
3043 es->s_state &= cpu_to_le16(~EXT4_VALID_FS); in ext4_setup_super()
3044 if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
3045 es->s_max_mnt_count = cpu_to_le16(EXT4_DFL_MAX_MNT_COUNT); in ext4_setup_super()
3046 le16_add_cpu(&es->s_mnt_count, 1); in ext4_setup_super()
3047 ext4_update_tstamp(es, s_mtime); in ext4_setup_super()
3590 struct ext4_super_block *es = sbi->s_es; in print_daily_error_info() local
3592 if (es->s_error_count) in print_daily_error_info()
3595 le32_to_cpu(es->s_error_count)); in print_daily_error_info()
3596 if (es->s_first_error_time) { in print_daily_error_info()
3599 ext4_get_tstamp(es, s_first_error_time), in print_daily_error_info()
3600 (int) sizeof(es->s_first_error_func), in print_daily_error_info()
3601 es->s_first_error_func, in print_daily_error_info()
3602 le32_to_cpu(es->s_first_error_line)); in print_daily_error_info()
3603 if (es->s_first_error_ino) in print_daily_error_info()
3605 le32_to_cpu(es->s_first_error_ino)); in print_daily_error_info()
3606 if (es->s_first_error_block) in print_daily_error_info()
3608 le64_to_cpu(es->s_first_error_block)); in print_daily_error_info()
3611 if (es->s_last_error_time) { in print_daily_error_info()
3614 ext4_get_tstamp(es, s_last_error_time), in print_daily_error_info()
3615 (int) sizeof(es->s_last_error_func), in print_daily_error_info()
3616 es->s_last_error_func, in print_daily_error_info()
3617 le32_to_cpu(es->s_last_error_line)); in print_daily_error_info()
3618 if (es->s_last_error_ino) in print_daily_error_info()
3620 le32_to_cpu(es->s_last_error_ino)); in print_daily_error_info()
3621 if (es->s_last_error_block) in print_daily_error_info()
3623 le64_to_cpu(es->s_last_error_block)); in print_daily_error_info()
4128 struct ext4_super_block *es = sbi->s_es; in ext4_calculate_overhead() local
4130 unsigned int j_blocks, j_inum = le32_to_cpu(es->s_journal_inum); in ext4_calculate_overhead()
4147 overhead = EXT4_B2C(sbi, le32_to_cpu(es->s_first_data_block)); in ext4_calculate_overhead()
4281 struct ext4_super_block *es) in ext4_set_def_opts() argument
4286 def_mount_opts = le32_to_cpu(es->s_default_mount_opts); in ext4_set_def_opts()
4312 if (le16_to_cpu(es->s_errors) == EXT4_ERRORS_PANIC) in ext4_set_def_opts()
4314 else if (le16_to_cpu(es->s_errors) == EXT4_ERRORS_CONTINUE) in ext4_set_def_opts()
4341 struct ext4_super_block *es = sbi->s_es; in ext4_handle_clustersize() local
4345 clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size); in ext4_handle_clustersize()
4353 sbi->s_cluster_bits = le32_to_cpu(es->s_log_cluster_size) - in ext4_handle_clustersize()
4354 le32_to_cpu(es->s_log_block_size); in ext4_handle_clustersize()
4356 le32_to_cpu(es->s_clusters_per_group); in ext4_handle_clustersize()
4421 struct ext4_super_block *es) in ext4_inode_info_init() argument
4425 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { in ext4_inode_info_init()
4429 sbi->s_inode_size = le16_to_cpu(es->s_inode_size); in ext4_inode_info_init()
4430 sbi->s_first_ino = le32_to_cpu(es->s_first_ino); in ext4_inode_info_init()
4469 v = le16_to_cpu(es->s_want_extra_isize); in ext4_inode_info_init()
4478 v = le16_to_cpu(es->s_min_extra_isize); in ext4_inode_info_init()
4493 static int ext4_encoding_init(struct super_block *sb, struct ext4_super_block *es) in ext4_encoding_init() argument
4497 __u16 encoding_flags = le16_to_cpu(es->s_encoding_flags); in ext4_encoding_init()
4502 encoding_info = ext4_sb_read_encoding(es); in ext4_encoding_init()
4534 static inline int ext4_encoding_init(struct super_block *sb, struct ext4_super_block *es) in ext4_encoding_init() argument
4540 static int ext4_init_metadata_csum(struct super_block *sb, struct ext4_super_block *es) in ext4_init_metadata_csum() argument
4551 if (!ext4_verify_csum_type(sb, es)) { in ext4_init_metadata_csum()
4569 if (!ext4_superblock_csum_verify(sb, es)) { in ext4_init_metadata_csum()
4577 sbi->s_csum_seed = le32_to_cpu(es->s_checksum_seed); in ext4_init_metadata_csum()
4579 sbi->s_csum_seed = ext4_chksum(sbi, ~0, es->s_uuid, in ext4_init_metadata_csum()
4580 sizeof(es->s_uuid)); in ext4_init_metadata_csum()
4585 struct ext4_super_block *es, in ext4_check_feature_compatibility() argument
4588 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && in ext4_check_feature_compatibility()
4596 if (es->s_creator_os == cpu_to_le32(EXT4_OS_HURD)) { in ext4_check_feature_compatibility()
4661 struct ext4_super_block *es) in ext4_geometry_check() argument
4668 if (blocks_count && ext4_blocks_count(es) > blocks_count) { in ext4_geometry_check()
4671 ext4_blocks_count(es), blocks_count); in ext4_geometry_check()
4679 if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) { in ext4_geometry_check()
4682 le32_to_cpu(es->s_first_data_block), in ext4_geometry_check()
4683 ext4_blocks_count(es)); in ext4_geometry_check()
4686 if ((es->s_first_data_block == 0) && (es->s_log_block_size == 0) && in ext4_geometry_check()
4693 blocks_count = (ext4_blocks_count(es) - in ext4_geometry_check()
4694 le32_to_cpu(es->s_first_data_block) + in ext4_geometry_check()
4701 ext4_blocks_count(es), in ext4_geometry_check()
4702 le32_to_cpu(es->s_first_data_block), in ext4_geometry_check()
4710 le32_to_cpu(es->s_inodes_count)) { in ext4_geometry_check()
4712 le32_to_cpu(es->s_inodes_count), in ext4_geometry_check()
4734 struct ext4_super_block *es, in ext4_group_desc_init() argument
4747 if (le32_to_cpu(es->s_first_meta_bg) > db_count) { in ext4_group_desc_init()
4751 le32_to_cpu(es->s_first_meta_bg), db_count); in ext4_group_desc_init()
4801 struct ext4_super_block *es, in ext4_load_and_init_journal() argument
4807 err = ext4_load_journal(sb, es, ctx->journal_devnum); in ext4_load_and_init_journal()
4924 struct ext4_super_block *es; in ext4_load_super() local
4957 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_load_super()
4958 sbi->s_es = es; in ext4_load_super()
4959 sb->s_magic = le16_to_cpu(es->s_magic); in ext4_load_super()
4966 if (le32_to_cpu(es->s_log_block_size) > in ext4_load_super()
4970 le32_to_cpu(es->s_log_block_size)); in ext4_load_super()
4973 if (le32_to_cpu(es->s_log_cluster_size) > in ext4_load_super()
4977 le32_to_cpu(es->s_log_cluster_size)); in ext4_load_super()
4981 blocksize = EXT4_MIN_BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); in ext4_load_super()
5016 es = (struct ext4_super_block *)(bh->b_data + offset); in ext4_load_super()
5017 sbi->s_es = es; in ext4_load_super()
5018 if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { in ext4_load_super()
5032 struct ext4_super_block *es = NULL; in __ext4_fill_super() local
5060 es = sbi->s_es; in __ext4_fill_super()
5061 sbi->s_kbytes_written = le64_to_cpu(es->s_kbytes_written); in __ext4_fill_super()
5063 err = ext4_init_metadata_csum(sb, es); in __ext4_fill_super()
5067 ext4_set_def_opts(sb, es); in __ext4_fill_super()
5069 sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid)); in __ext4_fill_super()
5070 sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid)); in __ext4_fill_super()
5081 if (ext4_inode_info_init(sb, es)) in __ext4_fill_super()
5096 if (ext4_encoding_init(sb, es)) in __ext4_fill_super()
5108 if (ext4_check_feature_compatibility(sb, es, silent)) in __ext4_fill_super()
5138 if (ext4_has_feature_encrypt(sb) && es->s_encryption_level) { in __ext4_fill_super()
5140 es->s_encryption_level); in __ext4_fill_super()
5149 sbi->s_desc_size = le16_to_cpu(es->s_desc_size); in __ext4_fill_super()
5162 sbi->s_blocks_per_group = le32_to_cpu(es->s_blocks_per_group); in __ext4_fill_super()
5163 sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group); in __ext4_fill_super()
5180 sbi->s_mount_state = le16_to_cpu(es->s_state) & ~EXT4_FC_REPLAY; in __ext4_fill_super()
5185 sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); in __ext4_fill_super()
5186 sbi->s_def_hash_version = es->s_def_hash_version; in __ext4_fill_super()
5188 i = le32_to_cpu(es->s_flags); in __ext4_fill_super()
5194 es->s_flags |= in __ext4_fill_super()
5199 es->s_flags |= in __ext4_fill_super()
5213 ext4_blocks_count(es)); in __ext4_fill_super()
5220 if (ext4_geometry_check(sb, es)) in __ext4_fill_super()
5223 err = ext4_group_desc_init(sb, es, logical_sb_block, &first_not_zeroed); in __ext4_fill_super()
5258 memcpy(&sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); in __ext4_fill_super()
5267 needs_recovery = (es->s_last_orphan != 0 || in __ext4_fill_super()
5272 if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) in __ext4_fill_super()
5280 err = ext4_load_and_init_journal(sb, es, ctx); in __ext4_fill_super()
5347 sbi->s_overhead = le32_to_cpu(es->s_overhead_clusters); in __ext4_fill_super()
5349 if (sbi->s_overhead > ext4_blocks_count(es)) in __ext4_fill_super()
5401 ret = ext4_setup_super(sb, es, sb_rdonly(sb)); in __ext4_fill_super()
5515 ext4_orphan_cleanup(sb, es); in __ext4_fill_super()
5527 err = ext4_mark_recovery_complete(sb, es); in __ext4_fill_super()
5536 if (es->s_error_count) in __ext4_fill_super()
5768 struct ext4_super_block *es; in ext4_get_dev_journal() local
5795 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_get_dev_journal()
5796 if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || in ext4_get_dev_journal()
5797 !(le32_to_cpu(es->s_feature_incompat) & in ext4_get_dev_journal()
5805 if ((le32_to_cpu(es->s_feature_ro_compat) & in ext4_get_dev_journal()
5807 es->s_checksum != ext4_superblock_csum(sb, es)) { in ext4_get_dev_journal()
5814 if (memcmp(EXT4_SB(sb)->s_es->s_journal_uuid, es->s_uuid, 16)) { in ext4_get_dev_journal()
5820 len = ext4_blocks_count(es); in ext4_get_dev_journal()
5853 struct ext4_super_block *es, in ext4_load_journal() argument
5857 unsigned int journal_inum = le32_to_cpu(es->s_journal_inum); in ext4_load_journal()
5867 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5872 journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); in ext4_load_journal()
5929 memcpy(save, ((char *) es) + in ext4_load_journal()
5933 memcpy(((char *) es) + EXT4_S_ERR_START, in ext4_load_journal()
5944 err = ext4_clear_journal_err(sb, es); in ext4_load_journal()
5952 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5953 es->s_journal_dev = cpu_to_le32(journal_devnum); in ext4_load_journal()
5970 struct ext4_super_block *es = sbi->s_es; in ext4_update_super() local
5985 ext4_update_tstamp(es, s_wtime); in ext4_update_super()
5986 es->s_kbytes_written = in ext4_update_super()
5991 ext4_free_blocks_count_set(es, in ext4_update_super()
5995 es->s_free_inodes_count = in ext4_update_super()
6001 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in ext4_update_super()
6002 if (!es->s_first_error_time && !es->s_first_error_time_hi) { in ext4_update_super()
6003 __ext4_update_tstamp(&es->s_first_error_time, in ext4_update_super()
6004 &es->s_first_error_time_hi, in ext4_update_super()
6006 strncpy(es->s_first_error_func, sbi->s_first_error_func, in ext4_update_super()
6007 sizeof(es->s_first_error_func)); in ext4_update_super()
6008 es->s_first_error_line = in ext4_update_super()
6010 es->s_first_error_ino = in ext4_update_super()
6012 es->s_first_error_block = in ext4_update_super()
6014 es->s_first_error_errcode = in ext4_update_super()
6017 __ext4_update_tstamp(&es->s_last_error_time, in ext4_update_super()
6018 &es->s_last_error_time_hi, in ext4_update_super()
6020 strncpy(es->s_last_error_func, sbi->s_last_error_func, in ext4_update_super()
6021 sizeof(es->s_last_error_func)); in ext4_update_super()
6022 es->s_last_error_line = cpu_to_le32(sbi->s_last_error_line); in ext4_update_super()
6023 es->s_last_error_ino = cpu_to_le32(sbi->s_last_error_ino); in ext4_update_super()
6024 es->s_last_error_block = cpu_to_le64(sbi->s_last_error_block); in ext4_update_super()
6025 es->s_last_error_errcode = in ext4_update_super()
6031 if (!es->s_error_count) in ext4_update_super()
6033 le32_add_cpu(&es->s_error_count, sbi->s_add_error_count); in ext4_update_super()
6097 struct ext4_super_block *es) in ext4_mark_recovery_complete() argument
6137 struct ext4_super_block *es) in ext4_clear_journal_err() argument
6165 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in ext4_clear_journal_err()
6317 struct ext4_super_block *es; in __ext4_remount() local
6406 es = sbi->s_es; in __ext4_remount()
6441 if (!(es->s_state & cpu_to_le16(EXT4_VALID_FS)) && in __ext4_remount()
6443 es->s_state = cpu_to_le16(sbi->s_mount_state); in __ext4_remount()
6450 ext4_mark_recovery_complete(sb, es); in __ext4_remount()
6482 if (es->s_last_orphan || !ext4_orphan_file_empty(sb)) { in __ext4_remount()
6498 err = ext4_clear_journal_err(sb, es); in __ext4_remount()
6502 sbi->s_mount_state = (le16_to_cpu(es->s_state) & in __ext4_remount()
6505 err = ext4_setup_super(sb, es, 0); in __ext4_remount()
6512 le64_to_cpu(es->s_mmp_block))) { in __ext4_remount()
6667 struct ext4_super_block *es = sbi->s_es; in ext4_statfs() local
6677 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead); in ext4_statfs()
6683 (ext4_r_blocks_count(es) + resv_blocks); in ext4_statfs()
6684 if (buf->f_bfree < (ext4_r_blocks_count(es) + resv_blocks)) in ext4_statfs()
6686 buf->f_files = le32_to_cpu(es->s_inodes_count); in ext4_statfs()
6689 buf->f_fsid = uuid_to_fsid(es->s_uuid); in ext4_statfs()