Lines Matching refs:count
39 void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) in ufs_free_fragments() argument
52 (unsigned long long)fragment, count); in ufs_free_fragments()
54 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments()
75 end_bit = bit + count; in ufs_free_fragments()
87 inode_sub_bytes(inode, count << uspi->s_fshift); in ufs_free_fragments()
88 fs32_add(sb, &ucg->cg_cs.cs_nffree, count); in ufs_free_fragments()
89 uspi->cs_total.cs_nffree += count; in ufs_free_fragments()
90 fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_free_fragments()
135 void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) in ufs_free_blocks() argument
148 (unsigned long long)fragment, count); in ufs_free_blocks()
150 if ((fragment & uspi->s_fpbmask) || (count & uspi->s_fpbmask)) { in ufs_free_blocks()
153 (unsigned long long)fragment, count); in ufs_free_blocks()
167 end_bit = bit + count; in ufs_free_blocks()
169 overflow = bit + count - uspi->s_fpg; in ufs_free_blocks()
170 count -= overflow; in ufs_free_blocks()
212 fragment += count; in ufs_free_blocks()
213 count = overflow; in ufs_free_blocks()
240 unsigned int count, sector_t oldb, in ufs_change_blocknr() argument
254 inode->i_ino, count, in ufs_change_blocknr()
261 end = count + beg; in ufs_change_blocknr()
345 u64 goal, unsigned count, int *err, in ufs_new_fragments() argument
356 (unsigned long long)goal, count); in ufs_new_fragments()
366 if (count + ufs_fragnum(fragment) > uspi->s_fpb) { in ufs_new_fragments()
369 (unsigned long long)fragment, count); in ufs_new_fragments()
370 count = uspi->s_fpb - ufs_fragnum(fragment); in ufs_new_fragments()
373 newcount = oldcount + count; in ufs_new_fragments()
423 result = ufs_alloc_fragments (inode, cgno, goal, count, err); in ufs_new_fragments()
431 max(UFS_I(inode)->i_lastfrag, fragment + count); in ufs_new_fragments()
447 fragment + count); in ufs_new_fragments()
480 fragment + count); in ufs_new_fragments()
515 unsigned cgno, fragno, fragoff, count, fragsize, i; in ufs_add_fragments() local
522 count = newcount - oldcount; in ufs_add_fragments()
525 if (fs32_to_cpu(sb, UFS_SB(sb)->fs_cs(cgno).cs_nffree) < count) in ufs_add_fragments()
545 if (!try_add_frags(inode, count)) in ufs_add_fragments()
559 if (fragsize != count) in ufs_add_fragments()
560 fs32_add(sb, &ucg->cg_frsum[fragsize - count], 1); in ufs_add_fragments()
564 fs32_sub(sb, &ucg->cg_cs.cs_nffree, count); in ufs_add_fragments()
565 fs32_sub(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_add_fragments()
566 uspi->cs_total.cs_nffree -= count; in ufs_add_fragments()
583 for (k = count; k < uspi->s_fpb; k++) \
588 u64 goal, unsigned count, int *err) in ufs_alloc_fragments() argument
598 inode->i_ino, cgno, (unsigned long long)goal, count); in ufs_alloc_fragments()
644 if (count == uspi->s_fpb) { in ufs_alloc_fragments()
651 for (allocsize = count; allocsize < uspi->s_fpb; allocsize++) in ufs_alloc_fragments()
660 for (i = count; i < uspi->s_fpb; i++) in ufs_alloc_fragments()
662 i = uspi->s_fpb - count; in ufs_alloc_fragments()
675 if (!try_add_frags(inode, count)) in ufs_alloc_fragments()
677 for (i = 0; i < count; i++) in ufs_alloc_fragments()
680 fs32_sub(sb, &ucg->cg_cs.cs_nffree, count); in ufs_alloc_fragments()
681 uspi->cs_total.cs_nffree -= count; in ufs_alloc_fragments()
682 fs32_sub(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_alloc_fragments()
685 if (count != allocsize) in ufs_alloc_fragments()
686 fs32_add(sb, &ucg->cg_frsum[allocsize - count], 1); in ufs_alloc_fragments()
797 u64 goal, unsigned count) in ufs_bitmap_search() argument
815 (unsigned long long)goal, count); in ufs_bitmap_search()
825 1 << (count - 1 + (uspi->s_fpb & 7))); in ufs_bitmap_search()
831 1 << (count - 1 + (uspi->s_fpb & 7))); in ufs_bitmap_search()
836 ucpi->c_cgx, start, length, count, in ufs_bitmap_search()
852 mask = mask_arr[count]; in ufs_bitmap_search()
853 want = want_arr[count]; in ufs_bitmap_search()
854 for (pos = 0; pos <= uspi->s_fpb - count; pos++) { in ufs_bitmap_search()