Lines Matching refs:uspi
48 struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; in ufs_block_to_path() local
49 int ptrs = uspi->s_apb; in ufs_block_to_path()
50 int ptrs_bits = uspi->s_apbshift; in ufs_block_to_path()
128 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_frag_map() local
129 u64 mask = (u64) uspi->s_apbmask>>uspi->s_fpbshift; in ufs_frag_map()
130 int shift = uspi->s_apbshift-uspi->s_fpbshift; in ufs_frag_map()
137 uspi->s_fpbshift, uspi->s_apbmask, in ufs_frag_map()
158 bh = sb_bread(sb, uspi->s_sbbase + in ufs_frag_map()
182 bh = sb_bread(sb, uspi->s_sbbase + in ufs_frag_map()
194 res += uspi->s_sbbase; in ufs_frag_map()
226 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_extend_tail() local
233 if (writes_to < (lastfrag | uspi->s_fpbmask)) in ufs_extend_tail()
234 new_size = (writes_to & uspi->s_fpbmask) + 1; in ufs_extend_tail()
236 new_size = uspi->s_fpb; in ufs_extend_tail()
238 p = ufs_get_direct_data_ptr(uspi, ufsi, block); in ufs_extend_tail()
240 new_size - (lastfrag & uspi->s_fpbmask), err, in ufs_extend_tail()
261 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_inode_getfrag() local
263 unsigned nfrags = uspi->s_fpb; in ufs_inode_getfrag()
271 p = ufs_get_direct_data_ptr(uspi, ufsi, index); in ufs_inode_getfrag()
280 nfrags = (new_fragment & uspi->s_fpbmask) + 1; in ufs_inode_getfrag()
285 ufs_get_direct_data_ptr(uspi, ufsi, index - 1)); in ufs_inode_getfrag()
287 goal += uspi->s_fpb; in ufs_inode_getfrag()
304 return tmp + uspi->s_sbbase; in ufs_inode_getfrag()
339 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_inode_getblock() local
340 int shift = uspi->s_apbshift - uspi->s_fpbshift; in ufs_inode_getblock()
354 index &= uspi->s_apbmask >> uspi->s_fpbshift; in ufs_inode_getblock()
355 if (uspi->fs_magic == UFS2_MAGIC) in ufs_inode_getblock()
364 if (index && (uspi->fs_magic == UFS2_MAGIC ? in ufs_inode_getblock()
367 goal = tmp + uspi->s_fpb; in ufs_inode_getblock()
369 goal = bh->b_blocknr + uspi->s_fpb; in ufs_inode_getblock()
371 uspi->s_fpb, err, locked_page); in ufs_inode_getblock()
387 tmp += uspi->s_sbbase; in ufs_inode_getblock()
399 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_getfrag_block() local
402 int depth = ufs_block_to_path(inode, fragment >> uspi->s_fpbshift, offsets); in ufs_getfrag_block()
404 unsigned frag = fragment & uspi->s_fpbmask; in ufs_getfrag_block()
433 unsigned tailfrags = lastfrag & uspi->s_fpbmask; in ufs_getfrag_block()
656 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_iget() local
663 if (ino < UFS_ROOTINO || ino > (uspi->s_ncg * uspi->s_ipg)) { in ufs_iget()
677 bh = sb_bread(sb, uspi->s_sbbase + ufs_inotofsba(inode->i_ino)); in ufs_iget()
700 (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift; in ufs_iget()
801 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_update_inode() local
807 inode->i_ino > (uspi->s_ncg * uspi->s_ipg)) { in ufs_update_inode()
817 if (uspi->fs_magic == UFS2_MAGIC) { in ufs_update_inode()
887 #define DIRECT_FRAGMENT ((inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift)
893 struct ufs_sb_private_info * uspi; in ufs_trunc_direct() local
902 uspi = UFS_SB(sb)->s_uspi; in ufs_trunc_direct()
906 frag2 = ((frag1 & uspi->s_fpbmask) ? ((frag1 | uspi->s_fpbmask) + 1) : frag1); in ufs_trunc_direct()
907 frag3 = frag4 & ~uspi->s_fpbmask; in ufs_trunc_direct()
929 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag1)); in ufs_trunc_direct()
943 p = ufs_get_direct_data_ptr(uspi, ufsi, i); in ufs_trunc_direct()
948 ufs_data_ptr_clear(uspi, p); in ufs_trunc_direct()
951 free_data(&ctx, tmp, uspi->s_fpb); in ufs_trunc_direct()
962 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag3)); in ufs_trunc_direct()
968 ufs_data_ptr_clear(uspi, p); in ufs_trunc_direct()
980 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in free_full_branch() local
981 struct ufs_buffer_head *ubh = ubh_bread(sb, ind_block, uspi->s_bsize); in free_full_branch()
988 for (i = 0; i < uspi->s_apb; i++) { in free_full_branch()
989 void *p = ubh_get_data_ptr(uspi, ubh, i); in free_full_branch()
997 for (i = 0; i < uspi->s_apb; i++) { in free_full_branch()
998 void *p = ubh_get_data_ptr(uspi, ubh, i); in free_full_branch()
1001 free_data(&ctx, block, uspi->s_fpb); in free_full_branch()
1007 ufs_free_blocks(inode, ind_block, uspi->s_fpb); in free_full_branch()
1013 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in free_branch_tail() local
1017 for (i = from; i < uspi->s_apb ; i++) { in free_branch_tail()
1018 void *p = ubh_get_data_ptr(uspi, ubh, i); in free_branch_tail()
1022 ufs_data_ptr_clear(uspi, p); in free_branch_tail()
1031 for (i = from; i < uspi->s_apb; i++) { in free_branch_tail()
1032 void *p = ubh_get_data_ptr(uspi, ubh, i); in free_branch_tail()
1036 ufs_data_ptr_clear(uspi, p); in free_branch_tail()
1039 free_data(&ctx, block, uspi->s_fpb); in free_branch_tail()
1054 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_alloc_lastblock() local
1061 lastfrag = (size + uspi->s_fsize - 1) >> uspi->s_fshift; in ufs_alloc_lastblock()
1099 end = uspi->s_fpb - ufs_fragnum(lastfrag) - 1; in ufs_alloc_lastblock()
1122 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; in ufs_truncate_blocks() local
1132 sector_t last = (inode->i_size - 1) >> uspi->s_bshift; in ufs_truncate_blocks()
1141 if (offsets[depth2] != uspi->s_apb - 1) in ufs_truncate_blocks()
1150 p = ufs_get_direct_data_ptr(uspi, ufsi, offsets[0]++); in ufs_truncate_blocks()
1155 ubh[i] = ubh_bread(sb, block, uspi->s_bsize); in ufs_truncate_blocks()
1158 ufs_data_ptr_clear(uspi, p); in ufs_truncate_blocks()
1162 p = ubh_get_data_ptr(uspi, ubh[i], offsets[i + 1]++); in ufs_truncate_blocks()
1168 p = ufs_get_direct_data_ptr(uspi, ufsi, i); in ufs_truncate_blocks()
1172 ufs_data_ptr_clear(uspi, p); in ufs_truncate_blocks()