Lines Matching refs:bm
47 struct affs_bm_info *bm; in affs_count_free_blocks() local
58 bm = AFFS_SB->s_bitmap; in affs_count_free_blocks()
60 for (i = AFFS_SB->s_bmap_count; i > 0; bm++, i--) in affs_count_free_blocks()
61 free += bm->bm_free; in affs_count_free_blocks()
71 struct affs_bm_info *bm; in affs_free_block() local
84 bm = &AFFS_SB->s_bitmap[bmap]; in affs_free_block()
91 bh = affs_bread(sb, bm->bm_key); in affs_free_block()
113 bm->bm_free++; in affs_free_block()
124 affs_error(sb,"affs_free_block","Cannot read bitmap block %u", bm->bm_key); in affs_free_block()
148 struct affs_bm_info *bm; in affs_alloc_block() local
174 bm = &AFFS_SB->s_bitmap[bmap]; in affs_alloc_block()
178 if (bm->bm_free) in affs_alloc_block()
186 bm++; in affs_alloc_block()
191 bm = AFFS_SB->s_bitmap; in affs_alloc_block()
194 } while (!bm->bm_free); in affs_alloc_block()
202 bh = affs_bread(sb, bm->bm_key); in affs_alloc_block()
245 bm->bm_free -= inode->u.affs_i.i_pa_cnt + 1; in affs_alloc_block()
262 affs_error(sb,"affs_read_block","Cannot read bitmap block %u", bm->bm_key); in affs_alloc_block()
273 struct affs_bm_info *bm; in affs_init_bitmap() local
294 size = AFFS_SB->s_bmap_count * sizeof(*bm); in affs_init_bitmap()
295 bm = AFFS_SB->s_bitmap = kmalloc(size, GFP_KERNEL); in affs_init_bitmap()
306 for (i = AFFS_SB->s_bmap_count; i > 0; bm++, i--) { in affs_init_bitmap()
309 bm->bm_key = be32_to_cpu(bmap_blk[blk]); in affs_init_bitmap()
310 bh = affs_bread(sb, bm->bm_key); in affs_init_bitmap()
318 bm->bm_key, kdevname(sb->s_dev)); in affs_init_bitmap()
322 pr_debug("AFFS: read bitmap block %d: %d\n", blk, bm->bm_key); in affs_init_bitmap()
323 bm->bm_free = affs_count_free_bits(sb->s_blocksize - 4, bh->b_data + 4); in affs_init_bitmap()
372 bm--; in affs_init_bitmap()
373 bm->bm_free = affs_count_free_bits(sb->s_blocksize - 4, bh->b_data + 4); in affs_init_bitmap()