/fs/ext4/ |
D | balloc.c | 42 le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) >> in ext4_get_group_number() 56 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_get_group_no_and_offset() 61 EXT4_SB(sb)->s_cluster_bits; in ext4_get_group_no_and_offset() 94 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_num_overhead_clusters() 171 blocks = ext4_blocks_count(EXT4_SB(sb)->s_es) - in num_clusters_in_group() 175 return EXT4_NUM_B2C(EXT4_SB(sb), blocks); in num_clusters_in_group() 185 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_init_block_bitmap() 272 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_get_group_desc() 328 if (unlikely(group >= EXT4_SB(sb)->s_groups_count)) in ext4_get_group_info() 332 grp_info = sbi_array_rcu_deref(EXT4_SB(sb), s_group_info, indexv); in ext4_get_group_info() [all …]
|
D | resize.c | 49 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_resize_begin() 59 if (EXT4_SB(sb)->s_es->s_reserved_gdt_blocks && in ext4_resize_begin() 71 le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { in ext4_resize_begin() 73 (unsigned long long)EXT4_SB(sb)->s_sbh->b_blocknr); in ext4_resize_begin() 81 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { in ext4_resize_begin() 93 &EXT4_SB(sb)->s_ext4_flags)) in ext4_resize_begin() 101 clear_bit_unlock(EXT4_FLAGS_RESIZING, &EXT4_SB(sb)->s_ext4_flags); in ext4_resize_end() 123 le16_to_cpu(EXT4_SB(sb)->s_es->s_reserved_gdt_blocks); in ext4_group_overhead_blocks() 133 struct ext4_sb_info *sbi = EXT4_SB(sb); in verify_group_input() 370 unsigned int itb = EXT4_SB(sb)->s_itb_per_group; in ext4_alloc_group_tables() [all …]
|
D | fast_commit.c | 159 __releases(&EXT4_SB(inode->i_sb)->s_fc_lock) in ext4_fc_wait_committing_inode() 175 lockdep_assert_held(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_wait_committing_inode() 177 spin_unlock(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_wait_committing_inode() 194 (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)) in ext4_fc_start_update() 198 spin_lock(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_start_update() 208 spin_unlock(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_start_update() 219 (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)) in ext4_fc_stop_update() 235 (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)) in ext4_fc_del() 239 spin_lock(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_del() 241 spin_unlock(&EXT4_SB(inode->i_sb)->s_fc_lock); in ext4_fc_del() [all …]
|
D | super.c | 261 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_superblock_csum() 281 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_superblock_csum_set() 439 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_journal_commit_callback() 588 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in __save_error_info() 590 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; in __save_error_info() 618 mod_timer(&EXT4_SB(sb)->s_err_report, jiffies + 24*60*60*HZ); in __save_error_info() 648 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_handle_error() 679 ___ratelimit(&(EXT4_SB(sb)->s_err_ratelimit_state), \ 689 if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) in __ext4_error() 713 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in __ext4_error_inode() [all …]
|
D | mmp.c | 13 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_mmp_csum() 139 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in kmmpd() 140 struct buffer_head *bh = EXT4_SB(sb)->s_mmp_bh; in kmmpd() 290 struct ext4_super_block *es = EXT4_SB(sb)->s_es; in ext4_multi_mount_protect() 391 EXT4_SB(sb)->s_mmp_bh = bh; in ext4_multi_mount_protect() 396 EXT4_SB(sb)->s_mmp_tsk = kthread_run(kmmpd, sb, "kmmpd-%.*s", in ext4_multi_mount_protect() 400 if (IS_ERR(EXT4_SB(sb)->s_mmp_tsk)) { in ext4_multi_mount_protect() 401 EXT4_SB(sb)->s_mmp_tsk = NULL; in ext4_multi_mount_protect()
|
D | ext4.h | 275 EXT4_SB(s)->s_cluster_bits) 278 # define EXT4_CLUSTER_BITS(s) (EXT4_SB(s)->s_cluster_bits) 283 #define EXT4_ADDR_PER_BLOCK_BITS(s) (EXT4_SB(s)->s_addr_per_block_bits) 284 #define EXT4_INODE_SIZE(s) (EXT4_SB(s)->s_inode_size) 285 #define EXT4_FIRST_INO(s) (EXT4_SB(s)->s_first_ino) 377 #define EXT4_DESC_SIZE(s) (EXT4_SB(s)->s_desc_size) 379 # define EXT4_BLOCKS_PER_GROUP(s) (EXT4_SB(s)->s_blocks_per_group) 380 # define EXT4_CLUSTERS_PER_GROUP(s) (EXT4_SB(s)->s_clusters_per_group) 381 # define EXT4_DESC_PER_BLOCK(s) (EXT4_SB(s)->s_desc_per_block) 382 # define EXT4_INODES_PER_GROUP(s) (EXT4_SB(s)->s_inodes_per_group) [all …]
|
D | ioctl.c | 92 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_reset_inode_seed() 510 EXT4_SB(sb)->s_want_extra_isize, in ext4_ioctl_setproject() 613 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_shutdown() 765 if (EXT4_SB(sb)->s_journal) { in ext4_ioctl_group_add() 766 jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); in ext4_ioctl_group_add() 767 err2 = jbd2_journal_flush(EXT4_SB(sb)->s_journal); in ext4_ioctl_group_add() 768 jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal); in ext4_ioctl_group_add() 946 err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count); in __ext4_ioctl() 947 if (EXT4_SB(sb)->s_journal) { in __ext4_ioctl() 948 jbd2_journal_lock_updates(EXT4_SB(sb)->s_journal); in __ext4_ioctl() [all …]
|
D | bitmap.c | 25 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_inode_bitmap_csum_verify() 46 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_inode_bitmap_csum_set() 63 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_block_bitmap_csum_verify() 89 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_block_bitmap_csum_set()
|
D | fsmap.c | 89 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_getfsmap_helper() 197 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_getfsmap_datadev_helper() 259 journal_t *journal = EXT4_SB(sb)->s_journal; in ext4_getfsmap_logdev() 318 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_getfsmap_find_sb() 418 for (agno = 0; agno < EXT4_SB(sb)->s_groups_count; agno++) { in ext4_getfsmap_find_fixed_metadata() 447 EXT4_SB(sb)->s_itb_per_group, in ext4_getfsmap_find_fixed_metadata() 470 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_getfsmap_datadev() 579 if (EXT4_SB(sb)->s_journal_bdev && in ext4_getfsmap_is_valid_device() 580 fm->fmr_device == new_encode_dev(EXT4_SB(sb)->s_journal_bdev->bd_dev)) in ext4_getfsmap_is_valid_device() 650 if (EXT4_SB(sb)->s_journal_bdev) { in ext4_getfsmap() [all …]
|
D | extents_status.c | 315 if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_es_find_extent_range() 368 if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_es_scan_range() 396 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in __es_scan_clu() 414 if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_es_scan_clu() 427 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_es_list_add() 443 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_es_list_del() 499 percpu_counter_inc(&EXT4_SB(inode->i_sb)-> in ext4_es_init_extent() 504 percpu_counter_inc(&EXT4_SB(inode->i_sb)->s_es_stats.es_stats_all_cnt); in ext4_es_init_extent() 515 percpu_counter_dec(&EXT4_SB(inode->i_sb)->s_es_stats.es_stats_all_cnt); in ext4_es_free_extent() 522 percpu_counter_dec(&EXT4_SB(inode->i_sb)-> in ext4_es_free_extent() [all …]
|
D | block_validity.c | 152 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_protect_reserved_inode() 216 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_setup_system_zone() 289 system_blks = rcu_dereference_protected(EXT4_SB(sb)->s_system_blks, in ext4_release_system_zone() 291 rcu_assign_pointer(EXT4_SB(sb)->s_system_blks, NULL); in ext4_release_system_zone() 300 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_sb_block_valid() 359 le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) in ext4_check_blockref()
|
D | ext4_jbd2.c | 70 if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) in ext4_journal_check_start() 76 journal = EXT4_SB(sb)->s_journal; in ext4_journal_check_start() 102 journal = EXT4_SB(sb)->s_journal; in __ext4_journal_start_sb() 103 if (!journal || (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)) in __ext4_journal_start_sb() 203 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_check_bdev_write_error() 381 struct buffer_head *bh = EXT4_SB(sb)->s_sbh; in __ext4_handle_dirty_super()
|
D | mballoc.c | 470 bb = e4b->bd_buddy + EXT4_SB(e4b->bd_sb)->s_mb_offsets[order]; in mb_find_buddy() 471 *max = EXT4_SB(e4b->bd_sb)->s_mb_maxs[order]; in mb_find_buddy() 491 blocknr += EXT4_C2B(EXT4_SB(sb), first + i); in mb_free_blocks_double() 718 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_mb_mark_free_simple() 776 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_mb_generate_buddy() 1040 struct inode *inode = EXT4_SB(sb)->s_buddy_cache; in ext4_mb_get_buddy_page_lock() 1177 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_mb_load_buddy_gfp() 1503 if (last + 1 < EXT4_SB(sb)->s_mb_maxs[0]) in mb_free_blocks() 1507 struct ext4_sb_info *sbi = EXT4_SB(sb); in mb_free_blocks() 1654 if (start + len < EXT4_SB(e4b->bd_sb)->s_mb_maxs[0]) in mb_mark_used() [all …]
|
D | inode.c | 55 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_inode_csum() 89 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_verify() 110 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os != in ext4_inode_csum_set() 208 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_evict_inode() 367 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_da_update_reserve_space() 415 le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) in __check_block_validity() 537 if (!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) && in ext4_map_blocks() 836 J_ASSERT((EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_getblk() 853 J_ASSERT((EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_getblk() 1138 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in ext4_write_begin() [all …]
|
D | ext4_jbd2.h | 19 #define EXT4_JOURNAL(inode) (EXT4_SB((inode)->i_sb)->s_journal) 182 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_add() 203 EXT4_SB(handle->h_transaction->t_journal->j_private); in ext4_journal_callback_try_del() 299 return blocks * EXT4_SB(sb)->s_cluster_ratio; in ext4_free_metadata_revoke_credits() 490 return blocks + 2*(EXT4_SB(inode->i_sb)->s_cluster_ratio - 1); in ext4_free_data_revoke_credits()
|
D | ialloc.c | 87 if (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY) in ext4_validate_inode_bitmap() 127 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_read_inode_bitmap() 266 sbi = EXT4_SB(sb); in ext4_free_inode() 380 struct flex_groups *fg = sbi_array_rcu_deref(EXT4_SB(sb), in get_orlov_stats() 426 struct ext4_sb_info *sbi = EXT4_SB(sb); in find_group_orlov() 577 int flex_size = ext4_flex_bg_size(EXT4_SB(sb)); in find_group_other() 681 int inodes_per_block = EXT4_SB(sb)->s_inodes_per_block; in recently_deleted() 722 bool check_recently_deleted = EXT4_SB(sb)->s_journal == NULL; in find_inode_bit() 755 unsigned long max_ino = le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count); in ext4_mark_inode_used() 953 sbi = EXT4_SB(sb); in __ext4_new_inode() [all …]
|
D | file.c | 120 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in ext4_file_read_iter() 232 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_generic_write_checks() 675 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in ext4_file_write_iter() 775 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_file_mmap() 801 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_sample_last_mounted() 850 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in ext4_file_open() 890 maxbytes = EXT4_SB(inode->i_sb)->s_bitmap_maxbytes; in ext4_llseek()
|
D | fsync.c | 108 journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; in ext4_fsync_journal() 134 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_sync_file()
|
D | xattr.c | 138 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_xattr_block_csum() 457 hash = ext4_xattr_inode_hash(EXT4_SB(ea_inode->i_sb), buffer, size); in ext4_xattr_inode_verify_hashes() 602 end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; in ext4_xattr_ibody_get() 654 if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) in ext4_xattr_get() 747 end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; in ext4_xattr_ibody_list() 803 BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "get_write_access"); in ext4_xattr_update_super_block() 804 if (ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh) == 0) { in ext4_xattr_update_super_block() 829 end = (void *)raw_inode + EXT4_SB(inode->i_sb)->s_inode_size; in ext4_get_inode_usage() 868 size_t cluster_size = 1 << (EXT4_SB(sb)->s_cluster_bits + in round_up_cluster() 1297 dquot_free_block(inode, EXT4_C2B(EXT4_SB(inode->i_sb), 1)); in ext4_xattr_release_block() [all …]
|
D | namei.c | 61 if (unlikely(EXT4_SB(inode->i_sb)->s_max_dir_size_kb && in ext4_append() 63 EXT4_SB(inode->i_sb)->s_max_dir_size_kb))) in ext4_append() 376 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_dirblock_csum() 472 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_dx_csum() 825 hinfo->hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned; in dx_probe() 826 hinfo->seed = EXT4_SB(dir->i_sb)->s_hash_seed; in dx_probe() 1178 EXT4_SB(dir->i_sb)->s_def_hash_version; in ext4_htree_fill_tree() 1181 EXT4_SB(dir->i_sb)->s_hash_unsigned; in ext4_htree_fill_tree() 1182 hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed; in ext4_htree_fill_tree() 2265 EXT4_SB(dir->i_sb)->s_def_hash_version; in make_indexed_dir() [all …]
|
D | sysfs.c | 84 EXT4_SB(sb)->s_sectors_written_start) >> 1))); in lifetime_write_kbytes_show() 518 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_register_sysfs() 550 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_unregister_sysfs()
|
D | extents.c | 53 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_extent_block_csum() 1308 struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es; in ext4_ext_grow_indepth() 2409 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_rereserve_cluster() 2428 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_remove_blocks() 2564 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_rm_leaf() 2786 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_ext_remove_space() 3070 spin_lock_init(&EXT4_SB(sb)->s_ext_stats_lock); in ext4_ext_init() 3071 EXT4_SB(sb)->s_ext_min = 1 << 30; in ext4_ext_init() 3072 EXT4_SB(sb)->s_ext_max = 0; in ext4_ext_init() 3086 if (EXT4_SB(sb)->s_ext_blocks && EXT4_SB(sb)->s_ext_extents) { in ext4_ext_release() [all …]
|
D | mballoc.h | 199 (fex->fe_start << EXT4_SB(sb)->s_cluster_bits); in ext4_grp_offs_to_block()
|
D | page-io.c | 190 if (ret < 0 && !ext4_forced_shutdown(EXT4_SB(inode->i_sb))) { in ext4_end_io_end() 228 struct ext4_sb_info *sbi = EXT4_SB(io_end->inode->i_sb); in ext4_add_complete_io()
|
D | move_extent.c | 408 if (*err == -EBUSY && retries++ < 4 && EXT4_SB(sb)->s_journal && in move_extent_per_page() 409 jbd2_journal_force_commit_nested(EXT4_SB(sb)->s_journal)) in move_extent_per_page()
|