Lines Matching refs:ei

54 			      struct ext4_inode_info *ei)  in ext4_inode_csum()  argument
62 csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)raw, offset); in ext4_inode_csum()
73 if (EXT4_FITS_IN_INODE(raw, ei, i_checksum_hi)) { in ext4_inode_csum()
86 struct ext4_inode_info *ei) in ext4_inode_csum_verify() argument
96 calculated = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_verify()
98 EXT4_FITS_IN_INODE(raw, ei, i_checksum_hi)) in ext4_inode_csum_verify()
107 struct ext4_inode_info *ei) in ext4_inode_csum_set() argument
116 csum = ext4_inode_csum(inode, raw, ei); in ext4_inode_csum_set()
119 EXT4_FITS_IN_INODE(raw, ei, i_checksum_hi)) in ext4_inode_csum_set()
377 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_da_update_reserve_space() local
379 spin_lock(&ei->i_block_reservation_lock); in ext4_da_update_reserve_space()
381 if (unlikely(used > ei->i_reserved_data_blocks)) { in ext4_da_update_reserve_space()
385 ei->i_reserved_data_blocks); in ext4_da_update_reserve_space()
387 used = ei->i_reserved_data_blocks; in ext4_da_update_reserve_space()
391 ei->i_reserved_data_blocks -= used; in ext4_da_update_reserve_space()
413 if ((ei->i_reserved_data_blocks == 0) && in ext4_da_update_reserve_space()
1600 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_da_reserve_space() local
1612 spin_lock(&ei->i_block_reservation_lock); in ext4_da_reserve_space()
1614 spin_unlock(&ei->i_block_reservation_lock); in ext4_da_reserve_space()
1618 ei->i_reserved_data_blocks++; in ext4_da_reserve_space()
1620 spin_unlock(&ei->i_block_reservation_lock); in ext4_da_reserve_space()
1628 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_da_release_space() local
1636 if (unlikely(to_free > ei->i_reserved_data_blocks)) { in ext4_da_release_space()
1646 ei->i_reserved_data_blocks); in ext4_da_release_space()
1648 to_free = ei->i_reserved_data_blocks; in ext4_da_release_space()
1650 ei->i_reserved_data_blocks -= to_free; in ext4_da_release_space()
1794 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_print_free_blocks() local
1808 ei->i_reserved_data_blocks); in ext4_print_free_blocks()
3732 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_direct_IO_write() local
3743 if (final_size > inode->i_size || final_size > ei->i_disksize) { in ext4_direct_IO_write()
3863 if (end > inode->i_size || end > ei->i_disksize) { in ext4_direct_IO_write()
4278 static void ext4_wait_dax_page(struct ext4_inode_info *ei) in ext4_wait_dax_page() argument
4280 up_write(&ei->i_mmap_sem); in ext4_wait_dax_page()
4282 down_write(&ei->i_mmap_sem); in ext4_wait_dax_page()
4287 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_break_layouts() local
4291 if (WARN_ON_ONCE(!rwsem_is_locked(&ei->i_mmap_sem))) in ext4_break_layouts()
4302 ext4_wait_dax_page(ei)); in ext4_break_layouts()
4476 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_inode_attach_jinode() local
4479 if (ei->jinode || !EXT4_SB(inode->i_sb)->s_journal) in ext4_inode_attach_jinode()
4484 if (!ei->jinode) { in ext4_inode_attach_jinode()
4489 ei->jinode = jinode; in ext4_inode_attach_jinode()
4490 jbd2_journal_init_jbd_inode(ei->jinode, inode); in ext4_inode_attach_jinode()
4529 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_truncate() local
4603 up_write(&ei->i_data_sem); in ext4_truncate()
4829 struct ext4_inode_info *ei) in ext4_inode_blocks() argument
4832 struct inode *inode = &(ei->vfs_inode); in ext4_inode_blocks()
4852 struct ext4_inode_info *ei) in ext4_iget_extra_inode() argument
4855 EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize; in ext4_iget_extra_inode()
4905 struct ext4_inode_info *ei; in __ext4_iget() local
4933 ei = EXT4_I(inode); in __ext4_iget()
4948 ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); in __ext4_iget()
4949 if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > in __ext4_iget()
4951 (ei->i_extra_isize & 3)) { in __ext4_iget()
4955 ei->i_extra_isize, in __ext4_iget()
4961 ei->i_extra_isize = 0; in __ext4_iget()
4971 ei->i_csum_seed = ext4_chksum(sbi, csum, (__u8 *)&gen, in __ext4_iget()
4975 if (!ext4_inode_csum_verify(inode, raw_inode, ei)) { in __ext4_iget()
4987 EXT4_FITS_IN_INODE(raw_inode, ei, i_projid)) in __ext4_iget()
4998 ei->i_projid = make_kprojid(&init_user_ns, i_projid); in __ext4_iget()
5001 ext4_clear_state_flags(ei); /* Only relevant on 32-bit archs */ in __ext4_iget()
5002 ei->i_inline_off = 0; in __ext4_iget()
5003 ei->i_dir_start_lookup = 0; in __ext4_iget()
5004 ei->i_dtime = le32_to_cpu(raw_inode->i_dtime); in __ext4_iget()
5030 ei->i_flags = le32_to_cpu(raw_inode->i_flags); in __ext4_iget()
5032 inode->i_blocks = ext4_inode_blocks(raw_inode, ei); in __ext4_iget()
5033 ei->i_file_acl = le32_to_cpu(raw_inode->i_file_acl_lo); in __ext4_iget()
5035 ei->i_file_acl |= in __ext4_iget()
5056 ei->i_disksize = inode->i_size; in __ext4_iget()
5058 ei->i_reserved_quota = 0; in __ext4_iget()
5061 ei->i_block_group = iloc.block_group; in __ext4_iget()
5062 ei->i_last_alloc_group = ~0; in __ext4_iget()
5068 ei->i_data[block] = raw_inode->i_block[block]; in __ext4_iget()
5069 INIT_LIST_HEAD(&ei->i_orphan); in __ext4_iget()
5092 ei->i_sync_tid = tid; in __ext4_iget()
5093 ei->i_datasync_tid = tid; in __ext4_iget()
5097 if (ei->i_extra_isize == 0) { in __ext4_iget()
5100 ei->i_extra_isize = sizeof(struct ext4_inode) - in __ext4_iget()
5103 ret = ext4_iget_extra_inode(inode, raw_inode, ei); in __ext4_iget()
5112 EXT4_EINODE_GET_XTIME(i_crtime, ei, raw_inode); in __ext4_iget()
5118 if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi)) in __ext4_iget()
5126 if (ei->i_file_acl && in __ext4_iget()
5127 !ext4_inode_block_valid(inode, ei->i_file_acl, 1)) { in __ext4_iget()
5130 ei->i_file_acl); in __ext4_iget()
5167 inode->i_link = (char *)ei->i_data; in __ext4_iget()
5169 nd_terminate_link(ei->i_data, inode->i_size, in __ext4_iget()
5170 sizeof(ei->i_data) - 1); in __ext4_iget()
5206 struct ext4_inode_info *ei) in ext4_inode_blocks_set() argument
5208 struct inode *inode = &(ei->vfs_inode); in ext4_inode_blocks_set()
5262 struct ext4_inode_info *ei = EXT4_I(inode); in other_inode_match() local
5267 spin_lock(&ei->i_raw_lock); in other_inode_match()
5271 ext4_inode_csum_set(inode, oi->raw_inode, ei); in other_inode_match()
5272 spin_unlock(&ei->i_raw_lock); in other_inode_match()
5319 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_do_update_inode() local
5328 spin_lock(&ei->i_raw_lock); in ext4_do_update_inode()
5335 err = ext4_inode_blocks_set(handle, raw_inode, ei); in ext4_do_update_inode()
5337 spin_unlock(&ei->i_raw_lock); in ext4_do_update_inode()
5344 i_projid = from_kprojid(&init_user_ns, ei->i_projid); in ext4_do_update_inode()
5352 if (ei->i_dtime && list_empty(&ei->i_orphan)) { in ext4_do_update_inode()
5372 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode); in ext4_do_update_inode()
5374 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime); in ext4_do_update_inode()
5375 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF); in ext4_do_update_inode()
5378 cpu_to_le16(ei->i_file_acl >> 32); in ext4_do_update_inode()
5379 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl); in ext4_do_update_inode()
5380 if (READ_ONCE(ei->i_disksize) != ext4_isize(inode->i_sb, raw_inode)) { in ext4_do_update_inode()
5381 ext4_isize_set(raw_inode, ei->i_disksize); in ext4_do_update_inode()
5384 if (ei->i_disksize > 0x7fffffffULL) { in ext4_do_update_inode()
5404 raw_inode->i_block[block] = ei->i_data[block]; in ext4_do_update_inode()
5411 if (ei->i_extra_isize) { in ext4_do_update_inode()
5412 if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi)) in ext4_do_update_inode()
5416 cpu_to_le16(ei->i_extra_isize); in ext4_do_update_inode()
5424 EXT4_FITS_IN_INODE(raw_inode, ei, i_projid)) in ext4_do_update_inode()
5427 ext4_inode_csum_set(inode, raw_inode, ei); in ext4_do_update_inode()
5428 spin_unlock(&ei->i_raw_lock); in ext4_do_update_inode()
5796 struct ext4_inode_info *ei = EXT4_I(inode); in ext4_getattr() local
5799 if (EXT4_FITS_IN_INODE(raw_inode, ei, i_crtime)) { in ext4_getattr()
5801 stat->btime.tv_sec = ei->i_crtime.tv_sec; in ext4_getattr()
5802 stat->btime.tv_nsec = ei->i_crtime.tv_nsec; in ext4_getattr()
5805 flags = ei->i_flags & EXT4_FL_USER_VISIBLE; in ext4_getattr()
6012 struct ext4_inode_info *ei = EXT4_I(inode); in __ext4_expand_extra_isize() local
6016 if ((EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > inode_size) || in __ext4_expand_extra_isize()
6017 (ei->i_extra_isize & 3)) { in __ext4_expand_extra_isize()
6019 ei->i_extra_isize, in __ext4_expand_extra_isize()
6023 if ((new_extra_isize < ei->i_extra_isize) || in __ext4_expand_extra_isize()