Lines Matching refs:es

70 					struct ext4_super_block *es);
72 struct ext4_super_block *es);
250 struct ext4_super_block *es) in ext4_verify_csum_type() argument
255 return es->s_checksum_type == EXT4_CRC32C_CHKSUM; in ext4_verify_csum_type()
259 struct ext4_super_block *es) in ext4_superblock_csum() argument
265 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
271 struct ext4_super_block *es) in ext4_superblock_csum_verify() argument
276 return es->s_checksum == ext4_superblock_csum(sb, es); in ext4_superblock_csum_verify()
281 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_superblock_csum_set() local
286 es->s_checksum = ext4_superblock_csum(sb, es); in ext4_superblock_csum_set()
415 #define ext4_update_tstamp(es, tstamp) \ argument
416 __ext4_update_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
417 #define ext4_get_tstamp(es, tstamp) \ argument
418 __ext4_get_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
424 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in __save_error_info() local
430 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in __save_error_info()
431 ext4_update_tstamp(es, s_last_error_time); in __save_error_info()
432 strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); in __save_error_info()
433 es->s_last_error_line = cpu_to_le32(line); in __save_error_info()
434 es->s_last_error_ino = cpu_to_le32(ino); in __save_error_info()
435 es->s_last_error_block = cpu_to_le64(block); in __save_error_info()
489 es->s_last_error_errcode = err; in __save_error_info()
490 if (!es->s_first_error_time) { in __save_error_info()
491 es->s_first_error_time = es->s_last_error_time; in __save_error_info()
492 es->s_first_error_time_hi = es->s_last_error_time_hi; in __save_error_info()
493 strncpy(es->s_first_error_func, func, in __save_error_info()
494 sizeof(es->s_first_error_func)); in __save_error_info()
495 es->s_first_error_line = cpu_to_le32(line); in __save_error_info()
496 es->s_first_error_ino = es->s_last_error_ino; in __save_error_info()
497 es->s_first_error_block = es->s_last_error_block; in __save_error_info()
498 es->s_first_error_errcode = es->s_last_error_errcode; in __save_error_info()
504 if (!es->s_error_count) in __save_error_info()
506 le32_add_cpu(&es->s_error_count, 1); in __save_error_info()
1052 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_update_dynamic_rev() local
1054 if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV) in ext4_update_dynamic_rev()
1062 es->s_first_ino = cpu_to_le32(EXT4_GOOD_OLD_FIRST_INO); in ext4_update_dynamic_rev()
1063 es->s_inode_size = cpu_to_le16(EXT4_GOOD_OLD_INODE_SIZE); in ext4_update_dynamic_rev()
1064 es->s_rev_level = cpu_to_le32(EXT4_DYNAMIC_REV); in ext4_update_dynamic_rev()
1167 struct ext4_super_block *es = sbi->s_es; in ext4_put_super() local
1207 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_put_super()
2051 static int ext4_sb_read_encoding(const struct ext4_super_block *es, in ext4_sb_read_encoding() argument
2055 __u16 magic = le16_to_cpu(es->s_encoding); in ext4_sb_read_encoding()
2066 *flags = le16_to_cpu(es->s_encoding_flags); in ext4_sb_read_encoding()
2567 struct ext4_super_block *es = sbi->s_es; in _ext4_show_options() local
2593 le16_to_cpu(es->s_def_resuid) != EXT4_DEF_RESUID) in _ext4_show_options()
2597 le16_to_cpu(es->s_def_resgid) != EXT4_DEF_RESGID) in _ext4_show_options()
2600 def_errors = nodefs ? -1 : le16_to_cpu(es->s_errors); in _ext4_show_options()
2674 static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, in ext4_setup_super() argument
2680 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { in ext4_setup_super()
2695 else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 && in ext4_setup_super()
2696 le16_to_cpu(es->s_mnt_count) >= in ext4_setup_super()
2697 (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
2701 else if (le32_to_cpu(es->s_checkinterval) && in ext4_setup_super()
2702 (ext4_get_tstamp(es, s_lastcheck) + in ext4_setup_super()
2703 le32_to_cpu(es->s_checkinterval) <= ktime_get_real_seconds())) in ext4_setup_super()
2708 es->s_state &= cpu_to_le16(~EXT4_VALID_FS); in ext4_setup_super()
2709 if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
2710 es->s_max_mnt_count = cpu_to_le16(EXT4_DFL_MAX_MNT_COUNT); in ext4_setup_super()
2711 le16_add_cpu(&es->s_mnt_count, 1); in ext4_setup_super()
2712 ext4_update_tstamp(es, s_mtime); in ext4_setup_super()
3014 struct ext4_super_block *es) in ext4_orphan_cleanup() argument
3022 if (!es->s_last_orphan) { in ext4_orphan_cleanup()
3042 if (es->s_last_orphan && !(s_flags & SB_RDONLY)) { in ext4_orphan_cleanup()
3045 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3085 while (es->s_last_orphan) { in ext4_orphan_cleanup()
3094 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3098 inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)); in ext4_orphan_cleanup()
3100 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3401 struct ext4_super_block *es = sbi->s_es; in print_daily_error_info() local
3403 if (es->s_error_count) in print_daily_error_info()
3406 le32_to_cpu(es->s_error_count)); in print_daily_error_info()
3407 if (es->s_first_error_time) { in print_daily_error_info()
3410 ext4_get_tstamp(es, s_first_error_time), in print_daily_error_info()
3411 (int) sizeof(es->s_first_error_func), in print_daily_error_info()
3412 es->s_first_error_func, in print_daily_error_info()
3413 le32_to_cpu(es->s_first_error_line)); in print_daily_error_info()
3414 if (es->s_first_error_ino) in print_daily_error_info()
3416 le32_to_cpu(es->s_first_error_ino)); in print_daily_error_info()
3417 if (es->s_first_error_block) in print_daily_error_info()
3419 le64_to_cpu(es->s_first_error_block)); in print_daily_error_info()
3422 if (es->s_last_error_time) { in print_daily_error_info()
3425 ext4_get_tstamp(es, s_last_error_time), in print_daily_error_info()
3426 (int) sizeof(es->s_last_error_func), in print_daily_error_info()
3427 es->s_last_error_func, in print_daily_error_info()
3428 le32_to_cpu(es->s_last_error_line)); in print_daily_error_info()
3429 if (es->s_last_error_ino) in print_daily_error_info()
3431 le32_to_cpu(es->s_last_error_ino)); in print_daily_error_info()
3432 if (es->s_last_error_block) in print_daily_error_info()
3434 le64_to_cpu(es->s_last_error_block)); in print_daily_error_info()
3940 struct ext4_super_block *es = sbi->s_es; in ext4_calculate_overhead() local
3942 unsigned int j_blocks, j_inum = le32_to_cpu(es->s_journal_inum); in ext4_calculate_overhead()
3959 overhead = EXT4_B2C(sbi, le32_to_cpu(es->s_first_data_block)); in ext4_calculate_overhead()
4032 struct ext4_super_block *es = NULL; in ext4_fill_super() local
4103 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_fill_super()
4104 sbi->s_es = es; in ext4_fill_super()
4105 sb->s_magic = le16_to_cpu(es->s_magic); in ext4_fill_super()
4108 sbi->s_kbytes_written = le64_to_cpu(es->s_kbytes_written); in ext4_fill_super()
4117 if (!ext4_verify_csum_type(sb, es)) { in ext4_fill_super()
4134 if (!ext4_superblock_csum_verify(sb, es)) { in ext4_fill_super()
4144 sbi->s_csum_seed = le32_to_cpu(es->s_checksum_seed); in ext4_fill_super()
4146 sbi->s_csum_seed = ext4_chksum(sbi, ~0, es->s_uuid, in ext4_fill_super()
4147 sizeof(es->s_uuid)); in ext4_fill_super()
4150 def_mount_opts = le32_to_cpu(es->s_default_mount_opts); in ext4_fill_super()
4187 sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid)); in ext4_fill_super()
4188 sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid)); in ext4_fill_super()
4210 if (le32_to_cpu(es->s_log_block_size) > in ext4_fill_super()
4214 le32_to_cpu(es->s_log_block_size)); in ext4_fill_super()
4217 if (le32_to_cpu(es->s_log_cluster_size) > in ext4_fill_super()
4221 le32_to_cpu(es->s_log_cluster_size)); in ext4_fill_super()
4225 blocksize = EXT4_MIN_BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
4230 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { in ext4_fill_super()
4234 sbi->s_inode_size = le16_to_cpu(es->s_inode_size); in ext4_fill_super()
4235 sbi->s_first_ino = le32_to_cpu(es->s_first_ino); in ext4_fill_super()
4273 v = le16_to_cpu(es->s_want_extra_isize); in ext4_fill_super()
4282 v = le16_to_cpu(es->s_min_extra_isize); in ext4_fill_super()
4318 if (ext4_sb_read_encoding(es, &encoding_info, in ext4_fill_super()
4372 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && in ext4_fill_super()
4380 if (es->s_creator_os == cpu_to_le32(EXT4_OS_HURD)) { in ext4_fill_super()
4464 if (ext4_has_feature_encrypt(sb) && es->s_encryption_level) { in ext4_fill_super()
4466 es->s_encryption_level); in ext4_fill_super()
4495 es = (struct ext4_super_block *)(bh->b_data + offset); in ext4_fill_super()
4496 sbi->s_es = es; in ext4_fill_super()
4497 if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { in ext4_fill_super()
4509 sbi->s_desc_size = le16_to_cpu(es->s_desc_size); in ext4_fill_super()
4522 sbi->s_blocks_per_group = le32_to_cpu(es->s_blocks_per_group); in ext4_fill_super()
4523 sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group); in ext4_fill_super()
4538 sbi->s_mount_state = le16_to_cpu(es->s_state) & ~EXT4_FC_REPLAY; in ext4_fill_super()
4543 sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); in ext4_fill_super()
4544 sbi->s_def_hash_version = es->s_def_hash_version; in ext4_fill_super()
4546 i = le32_to_cpu(es->s_flags); in ext4_fill_super()
4552 es->s_flags |= in ext4_fill_super()
4557 es->s_flags |= in ext4_fill_super()
4564 clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size); in ext4_fill_super()
4572 sbi->s_cluster_bits = le32_to_cpu(es->s_log_cluster_size) - in ext4_fill_super()
4573 le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
4575 le32_to_cpu(es->s_clusters_per_group); in ext4_fill_super()
4617 ext4_blocks_count(es)); in ext4_fill_super()
4629 if (blocks_count && ext4_blocks_count(es) > blocks_count) { in ext4_fill_super()
4632 ext4_blocks_count(es), blocks_count); in ext4_fill_super()
4640 if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) { in ext4_fill_super()
4643 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
4644 ext4_blocks_count(es)); in ext4_fill_super()
4647 if ((es->s_first_data_block == 0) && (es->s_log_block_size == 0) && in ext4_fill_super()
4654 blocks_count = (ext4_blocks_count(es) - in ext4_fill_super()
4655 le32_to_cpu(es->s_first_data_block) + in ext4_fill_super()
4662 ext4_blocks_count(es), in ext4_fill_super()
4663 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
4671 le32_to_cpu(es->s_inodes_count)) { in ext4_fill_super()
4673 le32_to_cpu(es->s_inodes_count), in ext4_fill_super()
4681 if (le32_to_cpu(es->s_first_meta_bg) > db_count) { in ext4_fill_super()
4685 le32_to_cpu(es->s_first_meta_bg), db_count); in ext4_fill_super()
4760 memcpy(&sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); in ext4_fill_super()
4787 needs_recovery = (es->s_last_orphan != 0 || in ext4_fill_super()
4791 if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) in ext4_fill_super()
4799 err = ext4_load_journal(sb, es, journal_devnum); in ext4_fill_super()
4933 sbi->s_overhead = le32_to_cpu(es->s_overhead_clusters); in ext4_fill_super()
4935 if (sbi->s_overhead > ext4_blocks_count(es)) in ext4_fill_super()
4987 ret = ext4_setup_super(sb, es, sb_rdonly(sb)); in ext4_fill_super()
5087 ext4_orphan_cleanup(sb, es); in ext4_fill_super()
5091 err = ext4_mark_recovery_complete(sb, es); in ext4_fill_super()
5120 if (es->s_error_count) in ext4_fill_super()
5310 struct ext4_super_block *es; in ext4_get_dev_journal() local
5337 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_get_dev_journal()
5338 if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || in ext4_get_dev_journal()
5339 !(le32_to_cpu(es->s_feature_incompat) & in ext4_get_dev_journal()
5347 if ((le32_to_cpu(es->s_feature_ro_compat) & in ext4_get_dev_journal()
5349 es->s_checksum != ext4_superblock_csum(sb, es)) { in ext4_get_dev_journal()
5356 if (memcmp(EXT4_SB(sb)->s_es->s_journal_uuid, es->s_uuid, 16)) { in ext4_get_dev_journal()
5362 len = ext4_blocks_count(es); in ext4_get_dev_journal()
5395 struct ext4_super_block *es, in ext4_load_journal() argument
5399 unsigned int journal_inum = le32_to_cpu(es->s_journal_inum); in ext4_load_journal()
5409 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5414 journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); in ext4_load_journal()
5471 memcpy(save, ((char *) es) + in ext4_load_journal()
5475 memcpy(((char *) es) + EXT4_S_ERR_START, in ext4_load_journal()
5486 err = ext4_clear_journal_err(sb, es); in ext4_load_journal()
5494 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5495 es->s_journal_dev = cpu_to_le32(journal_devnum); in ext4_load_journal()
5510 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_commit_super() local
5530 ext4_update_tstamp(es, s_wtime); in ext4_commit_super()
5532 es->s_kbytes_written = in ext4_commit_super()
5538 es->s_kbytes_written = in ext4_commit_super()
5541 ext4_free_blocks_count_set(es, in ext4_commit_super()
5545 es->s_free_inodes_count = in ext4_commit_super()
5587 struct ext4_super_block *es) in ext4_mark_recovery_complete() argument
5620 struct ext4_super_block *es) in ext4_clear_journal_err() argument
5648 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in ext4_clear_journal_err()
5795 struct ext4_super_block *es; in ext4_remount() local
5894 es = sbi->s_es; in ext4_remount()
5926 if (!(es->s_state & cpu_to_le16(EXT4_VALID_FS)) && in ext4_remount()
5928 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_remount()
5935 ext4_mark_recovery_complete(sb, es); in ext4_remount()
5967 if (es->s_last_orphan) { in ext4_remount()
5983 err = ext4_clear_journal_err(sb, es); in ext4_remount()
5987 sbi->s_mount_state = (le16_to_cpu(es->s_state) & in ext4_remount()
5990 err = ext4_setup_super(sb, es, 0); in ext4_remount()
5997 le64_to_cpu(es->s_mmp_block))) { in ext4_remount()
6139 struct ext4_super_block *es = sbi->s_es; in ext4_statfs() local
6150 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead); in ext4_statfs()
6156 (ext4_r_blocks_count(es) + resv_blocks); in ext4_statfs()
6157 if (buf->f_bfree < (ext4_r_blocks_count(es) + resv_blocks)) in ext4_statfs()
6159 buf->f_files = le32_to_cpu(es->s_inodes_count); in ext4_statfs()
6162 fsid = le64_to_cpup((void *)es->s_uuid) ^ in ext4_statfs()
6163 le64_to_cpup((void *)es->s_uuid + sizeof(u64)); in ext4_statfs()