Lines Matching refs:need_slots
194 unsigned int need_slots, nr_blocks, b; in afs_edit_dir_add() local
218 need_slots = round_up(12 + name->len + 1 + 4, AFS_DIR_DIRENT_SIZE); in afs_edit_dir_add()
219 need_slots /= AFS_DIR_DIRENT_SIZE; in afs_edit_dir_add()
272 meta->meta.alloc_ctrs[b] >= need_slots) { in afs_edit_dir_add()
276 slot = afs_find_contig_bits(block, need_slots); in afs_edit_dir_add()
321 afs_set_contig_bits(block, slot, need_slots); in afs_edit_dir_add()
330 meta->meta.alloc_ctrs[b] -= need_slots; in afs_edit_dir_add()
372 unsigned int need_slots, nr_blocks, b; in afs_edit_dir_remove() local
396 need_slots = round_up(12 + name->len + 1 + 4, AFS_DIR_DIRENT_SIZE); in afs_edit_dir_remove()
397 need_slots /= AFS_DIR_DIRENT_SIZE; in afs_edit_dir_remove()
424 meta->meta.alloc_ctrs[b] <= AFS_DIR_SLOTS_PER_BLOCK - 1 - need_slots) { in afs_edit_dir_remove()
450 memset(de, 0, sizeof(*de) * need_slots); in afs_edit_dir_remove()
453 afs_clear_contig_bits(block, slot, need_slots); in afs_edit_dir_remove()
462 meta->meta.alloc_ctrs[b] += need_slots; in afs_edit_dir_remove()