Lines Matching refs:es

70 					struct ext4_super_block *es);
72 struct ext4_super_block *es);
256 struct ext4_super_block *es) in ext4_verify_csum_type() argument
261 return es->s_checksum_type == EXT4_CRC32C_CHKSUM; in ext4_verify_csum_type()
265 struct ext4_super_block *es) in ext4_superblock_csum() argument
271 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
277 struct ext4_super_block *es) in ext4_superblock_csum_verify() argument
282 return es->s_checksum == ext4_superblock_csum(sb, es); in ext4_superblock_csum_verify()
287 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_superblock_csum_set() local
292 es->s_checksum = ext4_superblock_csum(sb, es); in ext4_superblock_csum_set()
421 #define ext4_update_tstamp(es, tstamp) \ argument
422 __ext4_update_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
423 #define ext4_get_tstamp(es, tstamp) \ argument
424 __ext4_get_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
430 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in __save_error_info() local
436 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in __save_error_info()
437 ext4_update_tstamp(es, s_last_error_time); in __save_error_info()
438 strncpy(es->s_last_error_func, func, sizeof(es->s_last_error_func)); in __save_error_info()
439 es->s_last_error_line = cpu_to_le32(line); in __save_error_info()
440 es->s_last_error_ino = cpu_to_le32(ino); in __save_error_info()
441 es->s_last_error_block = cpu_to_le64(block); in __save_error_info()
495 es->s_last_error_errcode = err; in __save_error_info()
496 if (!es->s_first_error_time) { in __save_error_info()
497 es->s_first_error_time = es->s_last_error_time; in __save_error_info()
498 es->s_first_error_time_hi = es->s_last_error_time_hi; in __save_error_info()
499 strncpy(es->s_first_error_func, func, in __save_error_info()
500 sizeof(es->s_first_error_func)); in __save_error_info()
501 es->s_first_error_line = cpu_to_le32(line); in __save_error_info()
502 es->s_first_error_ino = es->s_last_error_ino; in __save_error_info()
503 es->s_first_error_block = es->s_last_error_block; in __save_error_info()
504 es->s_first_error_errcode = es->s_last_error_errcode; in __save_error_info()
510 if (!es->s_error_count) in __save_error_info()
512 le32_add_cpu(&es->s_error_count, 1); in __save_error_info()
1060 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_update_dynamic_rev() local
1062 if (le32_to_cpu(es->s_rev_level) > EXT4_GOOD_OLD_REV) in ext4_update_dynamic_rev()
1070 es->s_first_ino = cpu_to_le32(EXT4_GOOD_OLD_FIRST_INO); in ext4_update_dynamic_rev()
1071 es->s_inode_size = cpu_to_le16(EXT4_GOOD_OLD_INODE_SIZE); in ext4_update_dynamic_rev()
1072 es->s_rev_level = cpu_to_le32(EXT4_DYNAMIC_REV); in ext4_update_dynamic_rev()
1175 struct ext4_super_block *es = sbi->s_es; in ext4_put_super() local
1210 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_put_super()
2046 static int ext4_sb_read_encoding(const struct ext4_super_block *es, in ext4_sb_read_encoding() argument
2050 __u16 magic = le16_to_cpu(es->s_encoding); in ext4_sb_read_encoding()
2061 *flags = le16_to_cpu(es->s_encoding_flags); in ext4_sb_read_encoding()
2554 struct ext4_super_block *es = sbi->s_es; in _ext4_show_options() local
2580 le16_to_cpu(es->s_def_resuid) != EXT4_DEF_RESUID) in _ext4_show_options()
2584 le16_to_cpu(es->s_def_resgid) != EXT4_DEF_RESGID) in _ext4_show_options()
2587 def_errors = nodefs ? -1 : le16_to_cpu(es->s_errors); in _ext4_show_options()
2661 static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, in ext4_setup_super() argument
2667 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { in ext4_setup_super()
2682 else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 && in ext4_setup_super()
2683 le16_to_cpu(es->s_mnt_count) >= in ext4_setup_super()
2684 (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
2688 else if (le32_to_cpu(es->s_checkinterval) && in ext4_setup_super()
2689 (ext4_get_tstamp(es, s_lastcheck) + in ext4_setup_super()
2690 le32_to_cpu(es->s_checkinterval) <= ktime_get_real_seconds())) in ext4_setup_super()
2695 es->s_state &= cpu_to_le16(~EXT4_VALID_FS); in ext4_setup_super()
2696 if (!(__s16) le16_to_cpu(es->s_max_mnt_count)) in ext4_setup_super()
2697 es->s_max_mnt_count = cpu_to_le16(EXT4_DFL_MAX_MNT_COUNT); in ext4_setup_super()
2698 le16_add_cpu(&es->s_mnt_count, 1); in ext4_setup_super()
2699 ext4_update_tstamp(es, s_mtime); in ext4_setup_super()
3001 struct ext4_super_block *es) in ext4_orphan_cleanup() argument
3009 if (!es->s_last_orphan) { in ext4_orphan_cleanup()
3029 if (es->s_last_orphan && !(s_flags & SB_RDONLY)) { in ext4_orphan_cleanup()
3032 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3075 while (es->s_last_orphan) { in ext4_orphan_cleanup()
3084 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3088 inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)); in ext4_orphan_cleanup()
3090 es->s_last_orphan = 0; in ext4_orphan_cleanup()
3384 struct ext4_super_block *es = sbi->s_es; in print_daily_error_info() local
3386 if (es->s_error_count) in print_daily_error_info()
3389 le32_to_cpu(es->s_error_count)); in print_daily_error_info()
3390 if (es->s_first_error_time) { in print_daily_error_info()
3393 ext4_get_tstamp(es, s_first_error_time), in print_daily_error_info()
3394 (int) sizeof(es->s_first_error_func), in print_daily_error_info()
3395 es->s_first_error_func, in print_daily_error_info()
3396 le32_to_cpu(es->s_first_error_line)); in print_daily_error_info()
3397 if (es->s_first_error_ino) in print_daily_error_info()
3399 le32_to_cpu(es->s_first_error_ino)); in print_daily_error_info()
3400 if (es->s_first_error_block) in print_daily_error_info()
3402 le64_to_cpu(es->s_first_error_block)); in print_daily_error_info()
3405 if (es->s_last_error_time) { in print_daily_error_info()
3408 ext4_get_tstamp(es, s_last_error_time), in print_daily_error_info()
3409 (int) sizeof(es->s_last_error_func), in print_daily_error_info()
3410 es->s_last_error_func, in print_daily_error_info()
3411 le32_to_cpu(es->s_last_error_line)); in print_daily_error_info()
3412 if (es->s_last_error_ino) in print_daily_error_info()
3414 le32_to_cpu(es->s_last_error_ino)); in print_daily_error_info()
3415 if (es->s_last_error_block) in print_daily_error_info()
3417 le64_to_cpu(es->s_last_error_block)); in print_daily_error_info()
3921 struct ext4_super_block *es = sbi->s_es; in ext4_calculate_overhead() local
3923 unsigned int j_blocks, j_inum = le32_to_cpu(es->s_journal_inum); in ext4_calculate_overhead()
3940 overhead = EXT4_B2C(sbi, le32_to_cpu(es->s_first_data_block)); in ext4_calculate_overhead()
4013 struct ext4_super_block *es = NULL; in ext4_fill_super() local
4084 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_fill_super()
4085 sbi->s_es = es; in ext4_fill_super()
4086 sb->s_magic = le16_to_cpu(es->s_magic); in ext4_fill_super()
4089 sbi->s_kbytes_written = le64_to_cpu(es->s_kbytes_written); in ext4_fill_super()
4098 if (!ext4_verify_csum_type(sb, es)) { in ext4_fill_super()
4115 if (!ext4_superblock_csum_verify(sb, es)) { in ext4_fill_super()
4125 sbi->s_csum_seed = le32_to_cpu(es->s_checksum_seed); in ext4_fill_super()
4127 sbi->s_csum_seed = ext4_chksum(sbi, ~0, es->s_uuid, in ext4_fill_super()
4128 sizeof(es->s_uuid)); in ext4_fill_super()
4131 def_mount_opts = le32_to_cpu(es->s_default_mount_opts); in ext4_fill_super()
4168 sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid)); in ext4_fill_super()
4169 sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid)); in ext4_fill_super()
4191 blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
4200 blocksize, le32_to_cpu(es->s_log_block_size)); in ext4_fill_super()
4204 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { in ext4_fill_super()
4208 sbi->s_inode_size = le16_to_cpu(es->s_inode_size); in ext4_fill_super()
4209 sbi->s_first_ino = le32_to_cpu(es->s_first_ino); in ext4_fill_super()
4247 v = le16_to_cpu(es->s_want_extra_isize); in ext4_fill_super()
4256 v = le16_to_cpu(es->s_min_extra_isize); in ext4_fill_super()
4298 if (ext4_sb_read_encoding(es, &encoding_info, in ext4_fill_super()
4352 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && in ext4_fill_super()
4360 if (es->s_creator_os == cpu_to_le32(EXT4_OS_HURD)) { in ext4_fill_super()
4421 if (le32_to_cpu(es->s_log_block_size) > in ext4_fill_super()
4425 le32_to_cpu(es->s_log_block_size)); in ext4_fill_super()
4428 if (le32_to_cpu(es->s_log_cluster_size) > in ext4_fill_super()
4432 le32_to_cpu(es->s_log_cluster_size)); in ext4_fill_super()
4459 if (ext4_has_feature_encrypt(sb) && es->s_encryption_level) { in ext4_fill_super()
4461 es->s_encryption_level); in ext4_fill_super()
4484 es = (struct ext4_super_block *)(bh->b_data + offset); in ext4_fill_super()
4485 sbi->s_es = es; in ext4_fill_super()
4486 if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { in ext4_fill_super()
4498 sbi->s_desc_size = le16_to_cpu(es->s_desc_size); in ext4_fill_super()
4511 sbi->s_blocks_per_group = le32_to_cpu(es->s_blocks_per_group); in ext4_fill_super()
4512 sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group); in ext4_fill_super()
4527 sbi->s_mount_state = le16_to_cpu(es->s_state); in ext4_fill_super()
4532 sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); in ext4_fill_super()
4533 sbi->s_def_hash_version = es->s_def_hash_version; in ext4_fill_super()
4535 i = le32_to_cpu(es->s_flags); in ext4_fill_super()
4541 es->s_flags |= in ext4_fill_super()
4546 es->s_flags |= in ext4_fill_super()
4553 clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size); in ext4_fill_super()
4561 sbi->s_cluster_bits = le32_to_cpu(es->s_log_cluster_size) - in ext4_fill_super()
4562 le32_to_cpu(es->s_log_block_size); in ext4_fill_super()
4564 le32_to_cpu(es->s_clusters_per_group); in ext4_fill_super()
4606 ext4_blocks_count(es)); in ext4_fill_super()
4618 if (blocks_count && ext4_blocks_count(es) > blocks_count) { in ext4_fill_super()
4621 ext4_blocks_count(es), blocks_count); in ext4_fill_super()
4629 if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) { in ext4_fill_super()
4632 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
4633 ext4_blocks_count(es)); in ext4_fill_super()
4636 if ((es->s_first_data_block == 0) && (es->s_log_block_size == 0) && in ext4_fill_super()
4643 blocks_count = (ext4_blocks_count(es) - in ext4_fill_super()
4644 le32_to_cpu(es->s_first_data_block) + in ext4_fill_super()
4651 ext4_blocks_count(es), in ext4_fill_super()
4652 le32_to_cpu(es->s_first_data_block), in ext4_fill_super()
4660 le32_to_cpu(es->s_inodes_count)) { in ext4_fill_super()
4662 le32_to_cpu(es->s_inodes_count), in ext4_fill_super()
4670 if (le32_to_cpu(es->s_first_meta_bg) > db_count) { in ext4_fill_super()
4674 le32_to_cpu(es->s_first_meta_bg), db_count); in ext4_fill_super()
4749 memcpy(&sb->s_uuid, es->s_uuid, sizeof(es->s_uuid)); in ext4_fill_super()
4776 needs_recovery = (es->s_last_orphan != 0 || in ext4_fill_super()
4780 if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) in ext4_fill_super()
4788 err = ext4_load_journal(sb, es, journal_devnum); in ext4_fill_super()
4929 if (es->s_overhead_clusters) in ext4_fill_super()
4930 sbi->s_overhead = le32_to_cpu(es->s_overhead_clusters); in ext4_fill_super()
4979 ret = ext4_setup_super(sb, es, sb_rdonly(sb)); in ext4_fill_super()
5067 ext4_orphan_cleanup(sb, es); in ext4_fill_super()
5071 err = ext4_mark_recovery_complete(sb, es); in ext4_fill_super()
5100 if (es->s_error_count) in ext4_fill_super()
5289 struct ext4_super_block *es; in ext4_get_dev_journal() local
5316 es = (struct ext4_super_block *) (bh->b_data + offset); in ext4_get_dev_journal()
5317 if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || in ext4_get_dev_journal()
5318 !(le32_to_cpu(es->s_feature_incompat) & in ext4_get_dev_journal()
5326 if ((le32_to_cpu(es->s_feature_ro_compat) & in ext4_get_dev_journal()
5328 es->s_checksum != ext4_superblock_csum(sb, es)) { in ext4_get_dev_journal()
5335 if (memcmp(EXT4_SB(sb)->s_es->s_journal_uuid, es->s_uuid, 16)) { in ext4_get_dev_journal()
5341 len = ext4_blocks_count(es); in ext4_get_dev_journal()
5374 struct ext4_super_block *es, in ext4_load_journal() argument
5378 unsigned int journal_inum = le32_to_cpu(es->s_journal_inum); in ext4_load_journal()
5388 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5393 journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev)); in ext4_load_journal()
5450 memcpy(save, ((char *) es) + in ext4_load_journal()
5454 memcpy(((char *) es) + EXT4_S_ERR_START, in ext4_load_journal()
5465 err = ext4_clear_journal_err(sb, es); in ext4_load_journal()
5473 journal_devnum != le32_to_cpu(es->s_journal_dev)) { in ext4_load_journal()
5474 es->s_journal_dev = cpu_to_le32(journal_devnum); in ext4_load_journal()
5489 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_commit_super() local
5507 ext4_update_tstamp(es, s_wtime); in ext4_commit_super()
5509 es->s_kbytes_written = in ext4_commit_super()
5515 es->s_kbytes_written = in ext4_commit_super()
5518 ext4_free_blocks_count_set(es, in ext4_commit_super()
5522 es->s_free_inodes_count = in ext4_commit_super()
5564 struct ext4_super_block *es) in ext4_mark_recovery_complete() argument
5597 struct ext4_super_block *es) in ext4_clear_journal_err() argument
5625 es->s_state |= cpu_to_le16(EXT4_ERROR_FS); in ext4_clear_journal_err()
5772 struct ext4_super_block *es; in ext4_remount() local
5871 es = sbi->s_es; in ext4_remount()
5903 if (!(es->s_state & cpu_to_le16(EXT4_VALID_FS)) && in ext4_remount()
5905 es->s_state = cpu_to_le16(sbi->s_mount_state); in ext4_remount()
5912 ext4_mark_recovery_complete(sb, es); in ext4_remount()
5946 if (es->s_last_orphan) { in ext4_remount()
5962 err = ext4_clear_journal_err(sb, es); in ext4_remount()
5966 sbi->s_mount_state = le16_to_cpu(es->s_state); in ext4_remount()
5968 err = ext4_setup_super(sb, es, 0); in ext4_remount()
5975 le64_to_cpu(es->s_mmp_block))) { in ext4_remount()
6112 struct ext4_super_block *es = sbi->s_es; in ext4_statfs() local
6123 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead); in ext4_statfs()
6129 (ext4_r_blocks_count(es) + resv_blocks); in ext4_statfs()
6130 if (buf->f_bfree < (ext4_r_blocks_count(es) + resv_blocks)) in ext4_statfs()
6132 buf->f_files = le32_to_cpu(es->s_inodes_count); in ext4_statfs()
6135 fsid = le64_to_cpup((void *)es->s_uuid) ^ in ext4_statfs()
6136 le64_to_cpup((void *)es->s_uuid + sizeof(u64)); in ext4_statfs()