Lines Matching refs:uspi
63 #define DIRECT_BLOCK ((inode->i_size + uspi->s_bsize - 1) >> uspi->s_bshift)
64 #define DIRECT_FRAGMENT ((inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift)
71 struct ufs_sb_private_info * uspi;
81 uspi = UFS_SB(sb)->s_uspi;
89 frag2 = ((frag1 & uspi->s_fpbmask) ? ((frag1 | uspi->s_fpbmask) + 1) : frag1);
90 frag3 = frag4 & ~uspi->s_fpbmask;
112 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag1));
128 p = ufs_get_direct_data_ptr(uspi, ufsi, i);
132 ufs_data_ptr_clear(uspi, p);
136 free_count = uspi->s_fpb;
138 free_count += uspi->s_fpb;
142 free_count = uspi->s_fpb;
156 p = ufs_get_direct_data_ptr(uspi, ufsi, ufs_fragstoblks(frag3));
161 ufs_data_ptr_clear(uspi, p);
175 struct ufs_sb_private_info * uspi;
188 uspi = UFS_SB(sb)->s_uspi;
197 ind_ubh = ubh_bread(sb, tmp, uspi->s_bsize);
203 ufs_data_ptr_clear(uspi, p);
208 for (i = indirect_block; i < uspi->s_apb; i++) {
209 ind = ubh_get_data_ptr(uspi, ind_ubh, i);
214 ufs_data_ptr_clear(uspi, ind);
218 free_count = uspi->s_fpb;
220 free_count += uspi->s_fpb;
224 free_count = uspi->s_fpb;
233 for (i = 0; i < uspi->s_apb; i++)
234 if (!ufs_is_data_ptr_zero(uspi,
235 ubh_get_data_ptr(uspi, ind_ubh, i)))
237 if (i >= uspi->s_apb) {
239 ufs_data_ptr_clear(uspi, p);
241 ufs_free_blocks (inode, tmp, uspi->s_fpb);
258 struct ufs_sb_private_info * uspi;
267 uspi = UFS_SB(sb)->s_uspi;
270 ? ((DIRECT_BLOCK - offset) >> uspi->s_apbshift) : 0;
276 dind_bh = ubh_bread(sb, tmp, uspi->s_bsize);
282 ufs_data_ptr_clear(uspi, p);
286 for (i = dindirect_block ; i < uspi->s_apb ; i++) {
287 dind = ubh_get_data_ptr(uspi, dind_bh, i);
291 retry |= ufs_trunc_indirect (inode, offset + (i << uspi->s_apbshift), dind);
295 for (i = 0; i < uspi->s_apb; i++)
296 if (!ufs_is_data_ptr_zero(uspi,
297 ubh_get_data_ptr(uspi, dind_bh, i)))
299 if (i >= uspi->s_apb) {
301 ufs_data_ptr_clear(uspi, p);
303 ufs_free_blocks(inode, tmp, uspi->s_fpb);
320 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
331 tindirect_block = (DIRECT_BLOCK > (UFS_NDADDR + uspi->s_apb + uspi->s_2apb))
332 ? ((DIRECT_BLOCK - UFS_NDADDR - uspi->s_apb - uspi->s_2apb) >> uspi->s_2apbshift) : 0;
334 p = ufs_get_direct_data_ptr(uspi, ufsi, UFS_TIND_BLOCK);
337 tind_bh = ubh_bread (sb, tmp, uspi->s_bsize);
343 ufs_data_ptr_clear(uspi, p);
347 for (i = tindirect_block ; i < uspi->s_apb ; i++) {
348 tind = ubh_get_data_ptr(uspi, tind_bh, i);
350 uspi->s_apb + ((i + 1) << uspi->s_2apbshift), tind);
353 for (i = 0; i < uspi->s_apb; i++)
354 if (!ufs_is_data_ptr_zero(uspi,
355 ubh_get_data_ptr(uspi, tind_bh, i)))
357 if (i >= uspi->s_apb) {
359 ufs_data_ptr_clear(uspi, p);
361 ufs_free_blocks(inode, tmp, uspi->s_fpb);
379 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
386 lastfrag = (i_size_read(inode) + uspi->s_fsize - 1) >> uspi->s_fshift;
425 end = uspi->s_fpb - ufs_fragnum(lastfrag) - 1;
448 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
474 ufs_get_direct_data_ptr(uspi, ufsi,
476 retry |= ufs_trunc_dindirect(inode, UFS_IND_BLOCK + uspi->s_apb,
477 ufs_get_direct_data_ptr(uspi, ufsi,