Lines Matching refs:i_sb

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()
66 *block = inode->i_size >> inode->i_sb->s_blocksize_bits; in ext4_append()
86 inode->i_size += inode->i_sb->s_blocksize; in ext4_append()
92 err = ext4_journal_get_write_access(handle, inode->i_sb, bh, in ext4_append()
100 ext4_std_error(inode->i_sb, err); in ext4_append()
141 if (ext4_simulate_fail(inode->i_sb, EXT4_SIM_DIRBLOCK_EIO)) in __ext4_read_dirblock()
146 __ext4_warning(inode->i_sb, func, line, in __ext4_read_dirblock()
168 inode->i_sb->s_blocksize) == in __ext4_read_dirblock()
169 inode->i_sb->s_blocksize) in __ext4_read_dirblock()
178 if (!ext4_has_metadata_csum(inode->i_sb) || in __ext4_read_dirblock()
189 !ext4_simulate_fail(inode->i_sb, EXT4_SIM_DIRBLOCK_CRC)) in __ext4_read_dirblock()
201 !ext4_simulate_fail(inode->i_sb, EXT4_SIM_DIRBLOCK_CRC)) in __ext4_read_dirblock()
346 int blocksize = EXT4_BLOCK_SIZE(inode->i_sb); in get_dirent_tail()
363 t = EXT4_DIRENT_TAIL(bh->b_data, EXT4_BLOCK_SIZE(inode->i_sb)); in get_dirent_tail()
378 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_dirblock_csum()
400 if (!ext4_has_metadata_csum(inode->i_sb)) in ext4_dirblock_csum_verify()
421 if (!ext4_has_metadata_csum(inode->i_sb)) in ext4_dirblock_csum_set()
449 int blocksize = EXT4_BLOCK_SIZE(inode->i_sb); in get_dx_countlimit()
474 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); in ext4_dx_csum()
496 if (!ext4_has_metadata_csum(inode->i_sb)) in ext4_dx_csum_verify()
507 EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) { in ext4_dx_csum_verify()
525 if (!ext4_has_metadata_csum(inode->i_sb)) in ext4_dx_csum_set()
536 EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) { in ext4_dx_csum_set()
610 unsigned int entry_space = dir->i_sb->s_blocksize - in dx_root_limit()
614 if (ext4_has_metadata_csum(dir->i_sb)) in dx_root_limit()
621 unsigned int entry_space = dir->i_sb->s_blocksize - in dx_node_limit()
624 if (ext4_has_metadata_csum(dir->i_sb)) in dx_node_limit()
744 unsigned blocksize = dir->i_sb->s_blocksize; in dx_show_entries()
852 hinfo->hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned; in dx_probe()
853 hinfo->seed = EXT4_SB(dir->i_sb)->s_hash_seed; in dx_probe()
873 if (indirect >= ext4_dir_htree_level(dir->i_sb)) { in dx_probe()
874 ext4_warning(dir->i_sb, in dx_probe()
877 ext4_dir_htree_level(dir->i_sb)); in dx_probe()
878 if (ext4_dir_htree_level(dir->i_sb) < EXT4_HTREE_LEVEL) { in dx_probe()
879 ext4_warning(dir->i_sb, "Enable large directory " in dx_probe()
1078 int csum = ext4_has_metadata_csum(dir->i_sb); in htree_dirblock_to_tree()
1089 dir->i_sb->s_blocksize - in htree_dirblock_to_tree()
1107 for (; de < top; de = ext4_next_entry(de, dir->i_sb->s_blocksize)) { in htree_dirblock_to_tree()
1110 (block<<EXT4_BLOCK_SIZE_BITS(dir->i_sb)) in htree_dirblock_to_tree()
1203 EXT4_SB(dir->i_sb)->s_def_hash_version; in ext4_htree_fill_tree()
1206 EXT4_SB(dir->i_sb)->s_hash_unsigned; in ext4_htree_fill_tree()
1207 hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed; in ext4_htree_fill_tree()
1243 de = ext4_next_entry(de, dir->i_sb->s_blocksize); in ext4_htree_fill_tree()
1299 return ext4_search_dir(bh, bh->b_data, dir->i_sb->s_blocksize, dir, in search_dirblock()
1320 int blocksize = EXT4_BLOCK_SIZE(dir->i_sb); in dx_make_map()
1322 if (ext4_has_metadata_csum(dir->i_sb)) in dx_make_map()
1404 const struct super_block *sb = parent->i_sb; in ext4_ci_compare()
1462 len = utf8_casefold(dir->i_sb->s_encoding, in ext4_fname_setup_ci_filename()
1555 dir->i_sb->s_blocksize); in ext4_search_dir()
1567 struct super_block *sb = dir->i_sb; in is_dx_internal_node()
1609 sb = dir->i_sb; in __ext4_find_entry()
1781 struct super_block * sb = dir->i_sb; in ext4_dx_find_entry()
1846 if (!ext4_valid_inum(dir->i_sb, ino)) { in ext4_lookup()
1855 inode = ext4_iget(dir->i_sb, ino, EXT4_IGET_NORMAL); in ext4_lookup()
1865 ext4_warning(inode->i_sb, in ext4_lookup()
1978 unsigned blocksize = dir->i_sb->s_blocksize; in do_split()
1991 if (ext4_has_metadata_csum(dir->i_sb)) in do_split()
2002 err = ext4_journal_get_write_access(handle, dir->i_sb, *bh, in do_split()
2008 err = ext4_journal_get_write_access(handle, dir->i_sb, frame->bh, in do_split()
2092 ext4_std_error(dir->i_sb, err); in do_split()
2150 ext4_set_de_type(inode->i_sb, de, inode->i_mode); in ext4_insert_dentry()
2175 unsigned int blocksize = dir->i_sb->s_blocksize; in add_dirent_to_buf()
2179 if (ext4_has_metadata_csum(inode->i_sb)) in add_dirent_to_buf()
2189 err = ext4_journal_get_write_access(handle, dir->i_sb, bh, in add_dirent_to_buf()
2192 ext4_std_error(dir->i_sb, err); in add_dirent_to_buf()
2217 ext4_std_error(dir->i_sb, err); in add_dirent_to_buf()
2242 if (ext4_has_metadata_csum(inode->i_sb)) in make_indexed_dir()
2245 blocksize = dir->i_sb->s_blocksize; in make_indexed_dir()
2248 retval = ext4_journal_get_write_access(handle, dir->i_sb, bh, in make_indexed_dir()
2251 ext4_std_error(dir->i_sb, retval); in make_indexed_dir()
2307 EXT4_SB(dir->i_sb)->s_def_hash_version; in make_indexed_dir()
2317 fname->hinfo.hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned; in make_indexed_dir()
2318 fname->hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed; in make_indexed_dir()
2387 if (ext4_has_metadata_csum(inode->i_sb)) in ext4_add_entry()
2390 sb = dir->i_sb; in ext4_add_entry()
2494 struct super_block *sb = dir->i_sb; in ext4_dx_add_entry()
2648 ext4_std_error(dir->i_sb, err); /* this is a no-op if err == 0 */ in ext4_dx_add_entry()
2672 unsigned int blocksize = dir->i_sb->s_blocksize; in ext4_generic_delete_entry()
2729 if (ext4_has_metadata_csum(dir->i_sb)) in ext4_delete_entry()
2733 err = ext4_journal_get_write_access(handle, dir->i_sb, bh, in ext4_delete_entry()
2739 dir->i_sb->s_blocksize, csum_size); in ext4_delete_entry()
2751 ext4_std_error(dir->i_sb, err); in ext4_delete_entry()
2831 credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + in ext4_create()
2850 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in ext4_create()
2866 credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + in ext4_mknod()
2884 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in ext4_mknod()
2904 EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) + in ext4_tmpfile()
2921 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in ext4_tmpfile()
2940 ext4_set_de_type(inode->i_sb, de, S_IFDIR); in ext4_init_dot_dotdot()
2954 ext4_set_de_type(inode->i_sb, de, S_IFDIR); in ext4_init_dot_dotdot()
2965 unsigned int blocksize = dir->i_sb->s_blocksize; in ext4_init_new_dir()
2969 if (ext4_has_metadata_csum(dir->i_sb)) in ext4_init_new_dir()
3014 credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + in ext4_mkdir()
3060 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in ext4_mkdir()
3084 sb = inode->i_sb; in ext4_empty_dir()
3150 if (unlikely(ext4_forced_shutdown(dir->i_sb))) in ext4_rmdir()
3180 EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); in ext4_rmdir()
3260 if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) in __ext4_unlink()
3267 EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); in __ext4_unlink()
3310 if (unlikely(ext4_forced_shutdown(dir->i_sb))) in ext4_unlink()
3354 err = ext4_journal_get_write_access(handle, inode->i_sb, bh, EXT4_JTR_NONE); in ext4_init_symlink_block()
3378 if (unlikely(ext4_forced_shutdown(dir->i_sb))) in ext4_symlink()
3381 err = fscrypt_prepare_symlink(dir, symname, len, dir->i_sb->s_blocksize, in ext4_symlink()
3396 credits = EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + in ext4_symlink()
3452 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in ext4_symlink()
3465 (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + in __ext4_link()
3492 if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) in __ext4_link()
3558 inode->i_sb->s_blocksize); in ext4_get_first_dir_block()
3559 de = ext4_next_entry(de, inode->i_sb->s_blocksize); in ext4_get_first_dir_block()
3607 return ext4_journal_get_write_access(handle, ent->dir->i_sb, in ext4_rename_dir_prepare()
3631 ext4_std_error(ent->dir->i_sb, retval); in ext4_rename_dir_finish()
3643 retval = ext4_journal_get_write_access(handle, ent->dir->i_sb, ent->bh, in ext4_setent()
3648 if (ext4_has_feature_filetype(ent->dir->i_sb)) in ext4_setent()
3657 ext4_std_error(ent->dir->i_sb, retval2); in ext4_setent()
3682 ext4_std_error(old.dir->i_sb, retval); in ext4_resetent()
3762 credits += (EXT4_MAXQUOTAS_TRANS_BLOCKS(ent->dir->i_sb) + in ext4_whiteout_for_rename()
3775 ext4_should_retry_alloc(ent->dir->i_sb, &retries)) in ext4_whiteout_for_rename()
3871 if (new.inode && !test_opt(new.dir->i_sb, NO_AUTO_DA_ALLOC)) in ext4_rename()
3874 credits = (2 * EXT4_DATA_TRANS_BLOCKS(old.dir->i_sb) + in ext4_rename()
3997 ext4_fc_mark_ineligible(old.inode->i_sb, in ext4_rename()
4000 struct super_block *sb = old.inode->i_sb; in ext4_rename()
4106 (2 * EXT4_DATA_TRANS_BLOCKS(old.dir->i_sb) + in ext4_cross_rename()
4164 ext4_fc_mark_ineligible(new.inode->i_sb, in ext4_cross_rename()
4197 if (unlikely(ext4_forced_shutdown(old_dir->i_sb))) in ext4_rename2()