Lines Matching refs:es
66 struct ext4_super_block *es);
68 struct ext4_super_block *es);
111 struct ext4_super_block *es) in ext4_verify_csum_type() argument
116 return es->s_checksum_type == EXT4_CRC32C_CHKSUM; in ext4_verify_csum_type()
120 struct ext4_super_block *es) in ext4_superblock_csum() argument
126 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
132 struct ext4_super_block *es) in ext4_superblock_csum_verify() argument
137 return es->s_checksum == ext4_superblock_csum(sb, es); in ext4_superblock_csum_verify()
142 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_superblock_csum_set() local
147 es->s_checksum = ext4_superblock_csum(sb, es); in ext4_superblock_csum_set()
286 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in __save_error_info() local
291 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in __save_error_info()
292 es->s_last_error_time = cpu_to_le32(get_seconds()); in __save_error_info()
293 strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); in __save_error_info()
294 es->s_last_error_line = cpu_to_le32(line); in __save_error_info()
295 if (!es->s_first_error_time) { in __save_error_info()
296 es->s_first_error_time = es->s_last_error_time; in __save_error_info()
297 strncpy(es->s_first_error_func, func, in __save_error_info()
298 sizeof(es->s_first_error_func)); in __save_error_info()
299 es->s_first_error_line = cpu_to_le32(line); in __save_error_info()
300 es->s_first_error_ino = es->s_last_error_ino; in __save_error_info()
301 es->s_first_error_block = es->s_last_error_block; in __save_error_info()
307 if (!es->s_error_count) in __save_error_info()
309 le32_add_cpu(&es->s_error_count, 1); in __save_error_info()
430 struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es; in __ext4_error_inode() local
432 es->s_last_error_ino = cpu_to_le32(inode->i_ino); in __ext4_error_inode()
433 es->s_last_error_block = cpu_to_le64(block); in __ext4_error_inode()
460 struct ext4_super_block *es; in __ext4_error_file() local
464 es = EXT4_SB(inode->i_sb)->s_es; in __ext4_error_file()
465 es->s_last_error_ino = cpu_to_le32(inode->i_ino); in __ext4_error_file()
665 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in __ext4_grp_locked_error() local
667 es->s_last_error_ino = cpu_to_le32(ino); in __ext4_grp_locked_error()
668 es->s_last_error_block = cpu_to_le64(block); in __ext4_grp_locked_error()
711 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_update_dynamic_rev() local
713 if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV) in ext4_update_dynamic_rev()
721 es->s_first_ino = cpu_to_le32(EXT4_GOOD_OLD_FIRST_INO); in ext4_update_dynamic_rev()
722 es->s_inode_size = cpu_to_le16(EXT4_GOOD_OLD_INODE_SIZE); in ext4_update_dynamic_rev()
723 es->s_rev_level = cpu_to_le32(EXT4_DYNAMIC_REV); in ext4_update_dynamic_rev()
797 struct ext4_super_block *es = sbi->s_es; in ext4_put_super() local
826 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_put_super()
1833 struct ext4_super_block *es = sbi->s_es; in _ext4_show_options() local
1859 le16_to_cpu(es->s_def_resuid) != EXT4_DEF_RESUID) in _ext4_show_options()
1863 le16_to_cpu(es->s_def_resgid) != EXT4_DEF_RESGID) in _ext4_show_options()
1866 def_errors = nodefs ? -1 : le16_to_cpu(es->s_errors); in _ext4_show_options()
1922 static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, in ext4_setup_super() argument
1928 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { in ext4_setup_super()
1942 else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 && in ext4_setup_super()
1943 le16_to_cpu(es->s_mnt_count) >= in ext4_setup_super()
1944 (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
1948 else if (le32_to_cpu(es->s_checkinterval) && in ext4_setup_super()
1949 (le32_to_cpu(es->s_lastcheck) + in ext4_setup_super()
1950 le32_to_cpu(es->s_checkinterval) <= get_seconds())) in ext4_setup_super()
1955 es->s_state &= cpu_to_le16(~EXT4_VALID_FS); in ext4_setup_super()
1956 if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
1957 es->s_max_mnt_count = cpu_to_le16(EXT4_DFL_MAX_MNT_COUNT); in ext4_setup_super()
1958 le16_add_cpu(&es->s_mnt_count, 1); in ext4_setup_super()
1959 es->s_mtime = cpu_to_le32(get_seconds()); in ext4_setup_super()
2262 struct ext4_super_block *es) in ext4_orphan_cleanup() argument
2270 if (!es->s_last_orphan) { in ext4_orphan_cleanup()
2290 if (es->s_last_orphan && !(s_flags & MS_RDONLY)) { in ext4_orphan_cleanup()
2293 es->s_last_orphan = 0; in ext4_orphan_cleanup()
2336 while (es->s_last_orphan) { in ext4_orphan_cleanup()
2345 es->s_last_orphan = 0; in ext4_orphan_cleanup()
2349 inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)); in ext4_orphan_cleanup()
2351 es->s_last_orphan = 0; in ext4_orphan_cleanup()
2650 struct ext4_super_block *es; in print_daily_error_info() local
2653 es = sbi->s_es; in print_daily_error_info()
2655 if (es->s_error_count) in print_daily_error_info()
2658 le32_to_cpu(es->s_error_count)); in print_daily_error_info()
2659 if (es->s_first_error_time) { in print_daily_error_info()
2661 sb->s_id, le32_to_cpu(es->s_first_error_time), in print_daily_error_info()
2662 (int) sizeof(es->s_first_error_func), in print_daily_error_info()
2663 es->s_first_error_func, in print_daily_error_info()
2664 le32_to_cpu(es->s_first_error_line)); in print_daily_error_info()
2665 if (es->s_first_error_ino) in print_daily_error_info()
2667 le32_to_cpu(es->s_first_error_ino)); in print_daily_error_info()
2668 if (es->s_first_error_block) in print_daily_error_info()
2670 le64_to_cpu(es->s_first_error_block)); in print_daily_error_info()
2673 if (es->s_last_error_time) { in print_daily_error_info()
2675 sb->s_id, le32_to_cpu(es->s_last_error_time), in print_daily_error_info()
2676 (int) sizeof(es->s_last_error_func), in print_daily_error_info()
2677 es->s_last_error_func, in print_daily_error_info()
2678 le32_to_cpu(es->s_last_error_line)); in print_daily_error_info()
2679 if (es->s_last_error_ino) in print_daily_error_info()
2681 le32_to_cpu(es->s_last_error_ino)); in print_daily_error_info()
2682 if (es->s_last_error_block) in print_daily_error_info()
2684 le64_to_cpu(es->s_last_error_block)); in print_daily_error_info()
3147 struct ext4_super_block *es = sbi->s_es; in ext4_calculate_overhead() local
3164 overhead = EXT4_B2C(sbi, le32_to_cpu(es->s_first_data_block)); in ext4_calculate_overhead()
3191 struct ext4_super_block *es = sbi->s_es; in ext4_clamp_want_extra_isize() local
3203 le16_to_cpu(es->s_want_extra_isize)) in ext4_clamp_want_extra_isize()
3205 le16_to_cpu(es->s_want_extra_isize); in ext4_clamp_want_extra_isize()
3207 le16_to_cpu(es->s_min_extra_isize)) in ext4_clamp_want_extra_isize()
3209 le16_to_cpu(es->s_min_extra_isize); in ext4_clamp_want_extra_isize()
3256 struct ext4_super_block *es = NULL; in ext4_fill_super() local
3323 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_fill_super()
3324 sbi->s_es = es; in ext4_fill_super()
3325 sb->s_magic = le16_to_cpu(es->s_magic); in ext4_fill_super()
3328 sbi->s_kbytes_written = le64_to_cpu(es->s_kbytes_written); in ext4_fill_super()
3337 if (!ext4_verify_csum_type(sb, es)) { in ext4_fill_super()
3356 if (!ext4_superblock_csum_verify(sb, es)) { in ext4_fill_super()
3366 sbi->s_csum_seed = le32_to_cpu(es->s_checksum_seed); in ext4_fill_super()
3368 sbi->s_csum_seed = ext4_chksum(sbi, ~0, es->s_uuid, in ext4_fill_super()
3369 sizeof(es->s_uuid)); in ext4_fill_super()
3372 def_mount_opts = le32_to_cpu(es->s_default_mount_opts); in ext4_fill_super()
3407 sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid)); in ext4_fill_super()
3408 sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid)); in ext4_fill_super()
3482 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && in ext4_fill_super()
3490 if (es->s_creator_os == cpu_to_le32(EXT4_OS_HURD)) { in ext4_fill_super()
3529 blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
3534 blocksize, le32_to_cpu(es->s_log_block_size)); in ext4_fill_super()
3537 if (le32_to_cpu(es->s_log_block_size) > in ext4_fill_super()
3541 le32_to_cpu(es->s_log_block_size)); in ext4_fill_super()
3544 if (le32_to_cpu(es->s_log_cluster_size) > in ext4_fill_super()
3548 le32_to_cpu(es->s_log_cluster_size)); in ext4_fill_super()
3572 if (ext4_has_feature_encrypt(sb) && es->s_encryption_level) { in ext4_fill_super()
3574 es->s_encryption_level); in ext4_fill_super()
3595 es = (struct ext4_super_block *)(bh->b_data + offset); in ext4_fill_super()
3596 sbi->s_es = es; in ext4_fill_super()
3597 if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { in ext4_fill_super()
3609 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { in ext4_fill_super()
3613 sbi->s_inode_size = le16_to_cpu(es->s_inode_size); in ext4_fill_super()
3614 sbi->s_first_ino = le32_to_cpu(es->s_first_ino); in ext4_fill_super()
3632 sbi->s_desc_size = le16_to_cpu(es->s_desc_size); in ext4_fill_super()
3645 sbi->s_blocks_per_group = le32_to_cpu(es->s_blocks_per_group); in ext4_fill_super()
3646 sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group); in ext4_fill_super()
3661 sbi->s_mount_state = le16_to_cpu(es->s_state); in ext4_fill_super()
3666 sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); in ext4_fill_super()
3667 sbi->s_def_hash_version = es->s_def_hash_version; in ext4_fill_super()
3669 i = le32_to_cpu(es->s_flags); in ext4_fill_super()
3675 es->s_flags |= in ext4_fill_super()
3680 es->s_flags |= in ext4_fill_super()
3687 clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size); in ext4_fill_super()
3696 sbi->s_cluster_bits = le32_to_cpu(es->s_log_cluster_size) - in ext4_fill_super()
3697 le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
3699 le32_to_cpu(es->s_clusters_per_group); in ext4_fill_super()
3741 ext4_blocks_count(es)); in ext4_fill_super()
3755 if (blocks_count && ext4_blocks_count(es) > blocks_count) { in ext4_fill_super()
3758 ext4_blocks_count(es), blocks_count); in ext4_fill_super()
3766 if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) { in ext4_fill_super()
3769 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
3770 ext4_blocks_count(es)); in ext4_fill_super()
3773 if ((es->s_first_data_block == 0) && (es->s_log_block_size == 0) && in ext4_fill_super()
3780 blocks_count = (ext4_blocks_count(es) - in ext4_fill_super()
3781 le32_to_cpu(es->s_first_data_block) + in ext4_fill_super()
3788 ext4_blocks_count(es), in ext4_fill_super()
3789 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
3797 le32_to_cpu(es->s_inodes_count)) { in ext4_fill_super()
3799 le32_to_cpu(es->s_inodes_count), in ext4_fill_super()
3807 if (le32_to_cpu(es->s_first_meta_bg) > db_count) { in ext4_fill_super()
3811 le32_to_cpu(es->s_first_meta_bg), db_count); in ext4_fill_super()
3876 memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); in ext4_fill_super()
3883 needs_recovery = (es->s_last_orphan != 0 || in ext4_fill_super()
3887 if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) in ext4_fill_super()
3895 err = ext4_load_journal(sb, es, journal_devnum); in ext4_fill_super()
4004 if (es->s_overhead_clusters) in ext4_fill_super()
4005 sbi->s_overhead = le32_to_cpu(es->s_overhead_clusters); in ext4_fill_super()
4048 if (ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY)) in ext4_fill_super()
4120 ext4_orphan_cleanup(sb, es); in ext4_fill_super()
4124 ext4_mark_recovery_complete(sb, es); in ext4_fill_super()
4151 if (es->s_error_count) in ext4_fill_super()
4317 struct ext4_super_block *es; in ext4_get_dev_journal() local
4343 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_get_dev_journal()
4344 if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || in ext4_get_dev_journal()
4345 !(le32_to_cpu(es->s_feature_incompat) & in ext4_get_dev_journal()
4353 if ((le32_to_cpu(es->s_feature_ro_compat) & in ext4_get_dev_journal()
4355 es->s_checksum != ext4_superblock_csum(sb, es)) { in ext4_get_dev_journal()
4362 if (memcmp(EXT4_SB(sb)->s_es->s_journal_uuid, es->s_uuid, 16)) { in ext4_get_dev_journal()
4368 len = ext4_blocks_count(es); in ext4_get_dev_journal()
4403 struct ext4_super_block *es, in ext4_load_journal() argument
4407 unsigned int journal_inum = le32_to_cpu(es->s_journal_inum); in ext4_load_journal()
4415 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
4420 journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); in ext4_load_journal()
4465 memcpy(save, ((char *) es) + in ext4_load_journal()
4469 memcpy(((char *) es) + EXT4_S_ERR_START, in ext4_load_journal()
4481 ext4_clear_journal_err(sb, es); in ext4_load_journal()
4484 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
4485 es->s_journal_dev = cpu_to_le32(journal_devnum); in ext4_load_journal()
4496 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_commit_super() local
4537 es->s_wtime = cpu_to_le32(get_seconds()); in ext4_commit_super()
4539 es->s_kbytes_written = in ext4_commit_super()
4544 es->s_kbytes_written = in ext4_commit_super()
4547 ext4_free_blocks_count_set(es, in ext4_commit_super()
4551 es->s_free_inodes_count = in ext4_commit_super()
4580 struct ext4_super_block *es) in ext4_mark_recovery_complete() argument
4608 struct ext4_super_block *es) in ext4_clear_journal_err() argument
4633 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in ext4_clear_journal_err()
4776 struct ext4_super_block *es; in ext4_remount() local
4863 es = sbi->s_es; in ext4_remount()
4898 if (!(es->s_state & cpu_to_le16(EXT4_VALID_FS)) && in ext4_remount()
4900 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_remount()
4903 ext4_mark_recovery_complete(sb, es); in ext4_remount()
4934 if (es->s_last_orphan) { in ext4_remount()
4950 ext4_clear_journal_err(sb, es); in ext4_remount()
4951 sbi->s_mount_state = le16_to_cpu(es->s_state); in ext4_remount()
4952 if (!ext4_setup_super(sb, es, 0)) in ext4_remount()
4956 le64_to_cpu(es->s_mmp_block))) { in ext4_remount()
5027 struct ext4_super_block *es = sbi->s_es; in ext4_statfs() local
5038 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead); in ext4_statfs()
5044 (ext4_r_blocks_count(es) + resv_blocks); in ext4_statfs()
5045 if (buf->f_bfree < (ext4_r_blocks_count(es) + resv_blocks)) in ext4_statfs()
5047 buf->f_files = le32_to_cpu(es->s_inodes_count); in ext4_statfs()
5050 fsid = le64_to_cpup((void *)es->s_uuid) ^ in ext4_statfs()
5051 le64_to_cpup((void *)es->s_uuid + sizeof(u64)); in ext4_statfs()