Lines Matching refs:sit_i

2110 	struct sit_info *sit_i = SIT_I(sbi);  in __mark_sit_entry_dirty()  local
2112 if (!__test_and_set_bit(segno, sit_i->dirty_sentries_bitmap)) { in __mark_sit_entry_dirty()
2113 sit_i->dirty_sentries++; in __mark_sit_entry_dirty()
2266 struct sit_info *sit_i = SIT_I(sbi); in f2fs_invalidate_blocks() local
2276 down_write(&sit_i->sentry_lock); in f2fs_invalidate_blocks()
2284 up_write(&sit_i->sentry_lock); in f2fs_invalidate_blocks()
2289 struct sit_info *sit_i = SIT_I(sbi); in f2fs_is_checkpointed_data() local
2297 down_read(&sit_i->sentry_lock); in f2fs_is_checkpointed_data()
2306 up_read(&sit_i->sentry_lock); in f2fs_is_checkpointed_data()
3220 struct sit_info *sit_i = SIT_I(sbi); in f2fs_allocate_data_block() local
3229 down_write(&sit_i->sentry_lock); in f2fs_allocate_data_block()
3275 sit_i->s_ops->allocate_segment(sbi, type, false); in f2fs_allocate_data_block()
3285 up_write(&sit_i->sentry_lock); in f2fs_allocate_data_block()
3491 struct sit_info *sit_i = SIT_I(sbi); in f2fs_do_replace_block() local
3527 down_write(&sit_i->sentry_lock); in f2fs_do_replace_block()
3570 up_write(&sit_i->sentry_lock); in f2fs_do_replace_block()
3941 struct sit_info *sit_i = SIT_I(sbi); in get_next_sit_page() local
3952 set_to_next_sit(sit_i, start); in get_next_sit_page()
4049 struct sit_info *sit_i = SIT_I(sbi); in f2fs_flush_sit_entries() local
4050 unsigned long *bitmap = sit_i->dirty_sentries_bitmap; in f2fs_flush_sit_entries()
4058 down_write(&sit_i->sentry_lock); in f2fs_flush_sit_entries()
4060 if (!sit_i->dirty_sentries) in f2fs_flush_sit_entries()
4074 if (!__has_cursum_space(journal, sit_i->dirty_sentries, SIT_JOURNAL) || in f2fs_flush_sit_entries()
4130 sit_offset = SIT_ENTRY_OFFSET(sit_i, segno); in f2fs_flush_sit_entries()
4138 sit_i->dirty_sentries--; in f2fs_flush_sit_entries()
4152 f2fs_bug_on(sbi, sit_i->dirty_sentries); in f2fs_flush_sit_entries()
4162 up_write(&sit_i->sentry_lock); in f2fs_flush_sit_entries()
4170 struct sit_info *sit_i; in build_sit_info() local
4177 sit_i = f2fs_kzalloc(sbi, sizeof(struct sit_info), GFP_KERNEL); in build_sit_info()
4178 if (!sit_i) in build_sit_info()
4181 SM_I(sbi)->sit_info = sit_i; in build_sit_info()
4183 sit_i->sentries = in build_sit_info()
4187 if (!sit_i->sentries) in build_sit_info()
4191 sit_i->dirty_sentries_bitmap = f2fs_kvzalloc(sbi, main_bitmap_size, in build_sit_info()
4193 if (!sit_i->dirty_sentries_bitmap) in build_sit_info()
4201 sit_i->bitmap = f2fs_kvzalloc(sbi, bitmap_size, GFP_KERNEL); in build_sit_info()
4202 if (!sit_i->bitmap) in build_sit_info()
4205 bitmap = sit_i->bitmap; in build_sit_info()
4208 sit_i->sentries[start].cur_valid_map = bitmap; in build_sit_info()
4211 sit_i->sentries[start].ckpt_valid_map = bitmap; in build_sit_info()
4215 sit_i->sentries[start].cur_valid_map_mir = bitmap; in build_sit_info()
4220 sit_i->sentries[start].discard_map = bitmap; in build_sit_info()
4225 sit_i->tmp_map = f2fs_kzalloc(sbi, SIT_VBLOCK_MAP_SIZE, GFP_KERNEL); in build_sit_info()
4226 if (!sit_i->tmp_map) in build_sit_info()
4230 sit_i->sec_entries = in build_sit_info()
4234 if (!sit_i->sec_entries) in build_sit_info()
4245 sit_i->sit_bitmap = kmemdup(src_bitmap, sit_bitmap_size, GFP_KERNEL); in build_sit_info()
4246 if (!sit_i->sit_bitmap) in build_sit_info()
4250 sit_i->sit_bitmap_mir = kmemdup(src_bitmap, in build_sit_info()
4252 if (!sit_i->sit_bitmap_mir) in build_sit_info()
4255 sit_i->invalid_segmap = f2fs_kvzalloc(sbi, in build_sit_info()
4257 if (!sit_i->invalid_segmap) in build_sit_info()
4262 sit_i->s_ops = &default_salloc_ops; in build_sit_info()
4264 sit_i->sit_base_addr = le32_to_cpu(raw_super->sit_blkaddr); in build_sit_info()
4265 sit_i->sit_blocks = sit_segs << sbi->log_blocks_per_seg; in build_sit_info()
4266 sit_i->written_valid_blocks = 0; in build_sit_info()
4267 sit_i->bitmap_size = sit_bitmap_size; in build_sit_info()
4268 sit_i->dirty_sentries = 0; in build_sit_info()
4269 sit_i->sents_per_block = SIT_ENTRY_PER_BLOCK; in build_sit_info()
4270 sit_i->elapsed_time = le64_to_cpu(sbi->ckpt->elapsed_time); in build_sit_info()
4271 sit_i->mounted_time = ktime_get_boottime_seconds(); in build_sit_info()
4272 init_rwsem(&sit_i->sentry_lock); in build_sit_info()
4347 struct sit_info *sit_i = SIT_I(sbi); in build_sit_entries() local
4362 start = start_blk * sit_i->sents_per_block; in build_sit_entries()
4363 end = (start_blk + readed) * sit_i->sents_per_block; in build_sit_entries()
4369 se = &sit_i->sentries[start]; in build_sit_entries()
4374 sit = sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, start)]; in build_sit_entries()
4427 se = &sit_i->sentries[start]; in build_sit_entries()
5043 struct sit_info *sit_i = SIT_I(sbi); in init_min_max_mtime() local
5046 down_write(&sit_i->sentry_lock); in init_min_max_mtime()
5048 sit_i->min_mtime = ULLONG_MAX; in init_min_max_mtime()
5059 if (sit_i->min_mtime > mtime) in init_min_max_mtime()
5060 sit_i->min_mtime = mtime; in init_min_max_mtime()
5062 sit_i->max_mtime = get_mtime(sbi, false); in init_min_max_mtime()
5063 sit_i->dirty_max_mtime = 0; in init_min_max_mtime()
5064 up_write(&sit_i->sentry_lock); in init_min_max_mtime()
5213 struct sit_info *sit_i = SIT_I(sbi); in destroy_sit_info() local
5215 if (!sit_i) in destroy_sit_info()
5218 if (sit_i->sentries) in destroy_sit_info()
5219 kvfree(sit_i->bitmap); in destroy_sit_info()
5220 kfree(sit_i->tmp_map); in destroy_sit_info()
5222 kvfree(sit_i->sentries); in destroy_sit_info()
5223 kvfree(sit_i->sec_entries); in destroy_sit_info()
5224 kvfree(sit_i->dirty_sentries_bitmap); in destroy_sit_info()
5227 kvfree(sit_i->sit_bitmap); in destroy_sit_info()
5229 kvfree(sit_i->sit_bitmap_mir); in destroy_sit_info()
5230 kvfree(sit_i->invalid_segmap); in destroy_sit_info()
5232 kfree(sit_i); in destroy_sit_info()