Lines Matching refs:ufsi

87 static inline int grow_chain32(struct ufs_inode_info *ufsi,  in grow_chain32()  argument
95 seq = read_seqbegin(&ufsi->meta_lock); in grow_chain32()
99 } while (read_seqretry(&ufsi->meta_lock, seq)); in grow_chain32()
103 static inline int grow_chain64(struct ufs_inode_info *ufsi, in grow_chain64() argument
111 seq = read_seqbegin(&ufsi->meta_lock); in grow_chain64()
115 } while (read_seqretry(&ufsi->meta_lock, seq)); in grow_chain64()
126 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_frag_map() local
149 if (!grow_chain32(ufsi, NULL, &ufsi->i_u1.i_data[*p++], chain, q)) in ufs_frag_map()
163 if (!grow_chain32(ufsi, bh, ptr, chain, ++q)) in ufs_frag_map()
172 if (!grow_chain64(ufsi, NULL, &ufsi->i_u1.u2_i_data[*p++], chain, q)) in ufs_frag_map()
187 if (!grow_chain64(ufsi, bh, ptr, chain, ++q)) in ufs_frag_map()
224 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_extend_tail() local
227 unsigned lastfrag = ufsi->i_lastfrag; /* it's a short file, so unsigned is enough */ in ufs_extend_tail()
238 p = ufs_get_direct_data_ptr(uspi, ufsi, block); in ufs_extend_tail()
259 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_inode_getfrag() local
271 p = ufs_get_direct_data_ptr(uspi, ufsi, index); in ufs_inode_getfrag()
276 lastfrag = ufsi->i_lastfrag; in ufs_inode_getfrag()
285 ufs_get_direct_data_ptr(uspi, ufsi, index - 1)); in ufs_inode_getfrag()
562 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs1_read_inode() local
589 ufsi->i_flags = fs32_to_cpu(sb, ufs_inode->ui_flags); in ufs1_read_inode()
590 ufsi->i_shadow = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_shadow); in ufs1_read_inode()
591 ufsi->i_oeftflag = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_oeftflag); in ufs1_read_inode()
595 memcpy(ufsi->i_u1.i_data, &ufs_inode->ui_u2.ui_addr, in ufs1_read_inode()
598 memcpy(ufsi->i_u1.i_symlink, ufs_inode->ui_u2.ui_symlink, in ufs1_read_inode()
600 ufsi->i_u1.i_symlink[sizeof(ufs_inode->ui_u2.ui_symlink) - 1] = 0; in ufs1_read_inode()
607 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs2_read_inode() local
635 ufsi->i_flags = fs32_to_cpu(sb, ufs2_inode->ui_flags); in ufs2_read_inode()
642 memcpy(ufsi->i_u1.u2_i_data, &ufs2_inode->ui_u2.ui_addr, in ufs2_read_inode()
645 memcpy(ufsi->i_u1.i_symlink, ufs2_inode->ui_u2.ui_symlink, in ufs2_read_inode()
647 ufsi->i_u1.i_symlink[sizeof(ufs2_inode->ui_u2.ui_symlink) - 1] = 0; in ufs2_read_inode()
654 struct ufs_inode_info *ufsi; in ufs_iget() local
674 ufsi = UFS_I(inode); in ufs_iget()
698 ufsi->i_lastfrag = in ufs_iget()
700 ufsi->i_dir_start_lookup = 0; in ufs_iget()
701 ufsi->i_osync = 0; in ufs_iget()
717 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs1_update_inode() local
733 ufs_inode->ui_flags = cpu_to_fs32(sb, ufsi->i_flags); in ufs1_update_inode()
737 ufs_inode->ui_u3.ui_sun.ui_shadow = cpu_to_fs32(sb, ufsi->i_shadow); in ufs1_update_inode()
738 ufs_inode->ui_u3.ui_sun.ui_oeftflag = cpu_to_fs32(sb, ufsi->i_oeftflag); in ufs1_update_inode()
743 ufs_inode->ui_u2.ui_addr.ui_db[0] = ufsi->i_u1.i_data[0]; in ufs1_update_inode()
745 memcpy(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.i_data, in ufs1_update_inode()
749 memcpy(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, in ufs1_update_inode()
760 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs2_update_inode() local
778 ufs_inode->ui_flags = cpu_to_fs32(sb, ufsi->i_flags); in ufs2_update_inode()
783 ufs_inode->ui_u2.ui_addr.ui_db[0] = ufsi->i_u1.u2_i_data[0]; in ufs2_update_inode()
785 memcpy(&ufs_inode->ui_u2.ui_addr, ufsi->i_u1.u2_i_data, in ufs2_update_inode()
788 memcpy(&ufs_inode->ui_u2.ui_symlink, ufsi->i_u1.i_symlink, in ufs2_update_inode()
890 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_trunc_direct() local
904 frag4 = min_t(u64, UFS_NDIR_FRAGMENT, ufsi->i_lastfrag); in ufs_trunc_direct()
928 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag1)); in ufs_trunc_direct()
942 p = ufs_get_direct_data_ptr(uspi, ufsi, i); in ufs_trunc_direct()
946 write_seqlock(&ufsi->meta_lock); in ufs_trunc_direct()
948 write_sequnlock(&ufsi->meta_lock); in ufs_trunc_direct()
961 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag3)); in ufs_trunc_direct()
966 write_seqlock(&ufsi->meta_lock); in ufs_trunc_direct()
968 write_sequnlock(&ufsi->meta_lock); in ufs_trunc_direct()
1119 struct ufs_inode_info *ufsi = UFS_I(inode); in ufs_truncate_blocks() local
1143 mutex_lock(&ufsi->truncate_mutex); in ufs_truncate_blocks()
1149 p = ufs_get_direct_data_ptr(uspi, ufsi, offsets[0]++); in ufs_truncate_blocks()
1156 write_seqlock(&ufsi->meta_lock); in ufs_truncate_blocks()
1158 write_sequnlock(&ufsi->meta_lock); in ufs_truncate_blocks()
1167 p = ufs_get_direct_data_ptr(uspi, ufsi, i); in ufs_truncate_blocks()
1170 write_seqlock(&ufsi->meta_lock); in ufs_truncate_blocks()
1172 write_sequnlock(&ufsi->meta_lock); in ufs_truncate_blocks()
1176 read_seqlock_excl(&ufsi->meta_lock); in ufs_truncate_blocks()
1177 ufsi->i_lastfrag = DIRECT_FRAGMENT; in ufs_truncate_blocks()
1178 read_sequnlock_excl(&ufsi->meta_lock); in ufs_truncate_blocks()
1180 mutex_unlock(&ufsi->truncate_mutex); in ufs_truncate_blocks()