Lines Matching refs:free_i
2410 struct free_segmap_info *free_i = FREE_I(sbi); in is_next_segment_free() local
2413 return !test_bit(segno, free_i->free_segmap); in is_next_segment_free()
2424 struct free_segmap_info *free_i = FREE_I(sbi); in get_new_segment() local
2434 spin_lock(&free_i->segmap_lock); in get_new_segment()
2437 segno = find_next_zero_bit(free_i->free_segmap, in get_new_segment()
2443 secno = find_next_zero_bit(free_i->free_secmap, MAIN_SECS(sbi), hint); in get_new_segment()
2446 secno = find_first_zero_bit(free_i->free_secmap, in get_new_segment()
2457 while (test_bit(left_start, free_i->free_secmap)) { in get_new_segment()
2462 left_start = find_first_zero_bit(free_i->free_secmap, in get_new_segment()
2502 f2fs_bug_on(sbi, test_bit(segno, free_i->free_segmap)); in get_new_segment()
2505 spin_unlock(&free_i->segmap_lock); in get_new_segment()
4278 struct free_segmap_info *free_i; in build_free_segmap() local
4282 free_i = f2fs_kzalloc(sbi, sizeof(struct free_segmap_info), GFP_KERNEL); in build_free_segmap()
4283 if (!free_i) in build_free_segmap()
4286 SM_I(sbi)->free_info = free_i; in build_free_segmap()
4289 free_i->free_segmap = f2fs_kvmalloc(sbi, bitmap_size, GFP_KERNEL); in build_free_segmap()
4290 if (!free_i->free_segmap) in build_free_segmap()
4294 free_i->free_secmap = f2fs_kvmalloc(sbi, sec_bitmap_size, GFP_KERNEL); in build_free_segmap()
4295 if (!free_i->free_secmap) in build_free_segmap()
4299 memset(free_i->free_segmap, 0xff, bitmap_size); in build_free_segmap()
4300 memset(free_i->free_secmap, 0xff, sec_bitmap_size); in build_free_segmap()
4303 free_i->start_segno = GET_SEGNO_FROM_SEG0(sbi, MAIN_BLKADDR(sbi)); in build_free_segmap()
4304 free_i->free_segments = 0; in build_free_segmap()
4305 free_i->free_sections = 0; in build_free_segmap()
4306 spin_lock_init(&free_i->segmap_lock); in build_free_segmap()
4519 struct free_segmap_info *free_i = FREE_I(sbi); in init_dirty_segmap() local
4525 segno = find_next_inuse(free_i, MAIN_SEGS(sbi), offset); in init_dirty_segmap()
5201 struct free_segmap_info *free_i = SM_I(sbi)->free_info; in destroy_free_segmap() local
5203 if (!free_i) in destroy_free_segmap()
5206 kvfree(free_i->free_segmap); in destroy_free_segmap()
5207 kvfree(free_i->free_secmap); in destroy_free_segmap()
5208 kfree(free_i); in destroy_free_segmap()