sit_i 244 fs/f2fs/gc.c struct sit_info *sit_i = SIT_I(sbi); sit_i 263 fs/f2fs/gc.c if (mtime < sit_i->min_mtime) sit_i 264 fs/f2fs/gc.c sit_i->min_mtime = mtime; sit_i 265 fs/f2fs/gc.c if (mtime > sit_i->max_mtime) sit_i 266 fs/f2fs/gc.c sit_i->max_mtime = mtime; sit_i 267 fs/f2fs/gc.c if (sit_i->max_mtime != sit_i->min_mtime) sit_i 268 fs/f2fs/gc.c age = 100 - div64_u64(100 * (mtime - sit_i->min_mtime), sit_i 269 fs/f2fs/gc.c sit_i->max_mtime - sit_i->min_mtime); sit_i 490 fs/f2fs/gc.c struct sit_info *sit_i = SIT_I(sbi); sit_i 494 fs/f2fs/gc.c down_read(&sit_i->sentry_lock); sit_i 497 fs/f2fs/gc.c up_read(&sit_i->sentry_lock); sit_i 1137 fs/f2fs/gc.c struct sit_info *sit_i = SIT_I(sbi); sit_i 1140 fs/f2fs/gc.c down_write(&sit_i->sentry_lock); sit_i 1143 fs/f2fs/gc.c up_write(&sit_i->sentry_lock); sit_i 2100 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 2102 fs/f2fs/segment.c if (!__test_and_set_bit(segno, sit_i->dirty_sentries_bitmap)) { sit_i 2103 fs/f2fs/segment.c sit_i->dirty_sentries++; sit_i 2223 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 2232 fs/f2fs/segment.c down_write(&sit_i->sentry_lock); sit_i 2239 fs/f2fs/segment.c up_write(&sit_i->sentry_lock); sit_i 2244 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 2252 fs/f2fs/segment.c down_read(&sit_i->sentry_lock); sit_i 2261 fs/f2fs/segment.c up_read(&sit_i->sentry_lock); sit_i 3078 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 3084 fs/f2fs/segment.c down_write(&sit_i->sentry_lock); sit_i 3110 fs/f2fs/segment.c sit_i->s_ops->allocate_segment(sbi, type, false); sit_i 3120 fs/f2fs/segment.c up_write(&sit_i->sentry_lock); sit_i 3295 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 3330 fs/f2fs/segment.c down_write(&sit_i->sentry_lock); sit_i 3365 fs/f2fs/segment.c up_write(&sit_i->sentry_lock); sit_i 3722 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 3733 fs/f2fs/segment.c set_to_next_sit(sit_i, start); sit_i 3827 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 3828 fs/f2fs/segment.c unsigned long *bitmap = sit_i->dirty_sentries_bitmap; sit_i 3836 fs/f2fs/segment.c down_write(&sit_i->sentry_lock); sit_i 3838 fs/f2fs/segment.c if (!sit_i->dirty_sentries) sit_i 3852 fs/f2fs/segment.c if (!__has_cursum_space(journal, sit_i->dirty_sentries, SIT_JOURNAL) || sit_i 3908 fs/f2fs/segment.c sit_offset = SIT_ENTRY_OFFSET(sit_i, segno); sit_i 3916 fs/f2fs/segment.c sit_i->dirty_sentries--; sit_i 3930 fs/f2fs/segment.c f2fs_bug_on(sbi, sit_i->dirty_sentries); sit_i 3940 fs/f2fs/segment.c up_write(&sit_i->sentry_lock); sit_i 3948 fs/f2fs/segment.c struct sit_info *sit_i; sit_i 3954 fs/f2fs/segment.c sit_i = f2fs_kzalloc(sbi, sizeof(struct sit_info), GFP_KERNEL); sit_i 3955 fs/f2fs/segment.c if (!sit_i) sit_i 3958 fs/f2fs/segment.c SM_I(sbi)->sit_info = sit_i; sit_i 3960 fs/f2fs/segment.c sit_i->sentries = sit_i 3964 fs/f2fs/segment.c if (!sit_i->sentries) sit_i 3968 fs/f2fs/segment.c sit_i->dirty_sentries_bitmap = f2fs_kvzalloc(sbi, main_bitmap_size, sit_i 3970 fs/f2fs/segment.c if (!sit_i->dirty_sentries_bitmap) sit_i 3978 fs/f2fs/segment.c sit_i->bitmap = f2fs_kvzalloc(sbi, bitmap_size, GFP_KERNEL); sit_i 3979 fs/f2fs/segment.c if (!sit_i->bitmap) sit_i 3982 fs/f2fs/segment.c bitmap = sit_i->bitmap; sit_i 3985 fs/f2fs/segment.c sit_i->sentries[start].cur_valid_map = bitmap; sit_i 3988 fs/f2fs/segment.c sit_i->sentries[start].ckpt_valid_map = bitmap; sit_i 3992 fs/f2fs/segment.c sit_i->sentries[start].cur_valid_map_mir = bitmap; sit_i 3996 fs/f2fs/segment.c sit_i->sentries[start].discard_map = bitmap; sit_i 4000 fs/f2fs/segment.c sit_i->tmp_map = f2fs_kzalloc(sbi, SIT_VBLOCK_MAP_SIZE, GFP_KERNEL); sit_i 4001 fs/f2fs/segment.c if (!sit_i->tmp_map) sit_i 4005 fs/f2fs/segment.c sit_i->sec_entries = sit_i 4009 fs/f2fs/segment.c if (!sit_i->sec_entries) sit_i 4020 fs/f2fs/segment.c sit_i->sit_bitmap = kmemdup(src_bitmap, sit_bitmap_size, GFP_KERNEL); sit_i 4021 fs/f2fs/segment.c if (!sit_i->sit_bitmap) sit_i 4025 fs/f2fs/segment.c sit_i->sit_bitmap_mir = kmemdup(src_bitmap, sit_i 4027 fs/f2fs/segment.c if (!sit_i->sit_bitmap_mir) sit_i 4030 fs/f2fs/segment.c sit_i->invalid_segmap = f2fs_kvzalloc(sbi, sit_i 4032 fs/f2fs/segment.c if (!sit_i->invalid_segmap) sit_i 4037 fs/f2fs/segment.c sit_i->s_ops = &default_salloc_ops; sit_i 4039 fs/f2fs/segment.c sit_i->sit_base_addr = le32_to_cpu(raw_super->sit_blkaddr); sit_i 4040 fs/f2fs/segment.c sit_i->sit_blocks = sit_segs << sbi->log_blocks_per_seg; sit_i 4041 fs/f2fs/segment.c sit_i->written_valid_blocks = 0; sit_i 4042 fs/f2fs/segment.c sit_i->bitmap_size = sit_bitmap_size; sit_i 4043 fs/f2fs/segment.c sit_i->dirty_sentries = 0; sit_i 4044 fs/f2fs/segment.c sit_i->sents_per_block = SIT_ENTRY_PER_BLOCK; sit_i 4045 fs/f2fs/segment.c sit_i->elapsed_time = le64_to_cpu(sbi->ckpt->elapsed_time); sit_i 4046 fs/f2fs/segment.c sit_i->mounted_time = ktime_get_real_seconds(); sit_i 4047 fs/f2fs/segment.c init_rwsem(&sit_i->sentry_lock); sit_i 4115 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 4130 fs/f2fs/segment.c start = start_blk * sit_i->sents_per_block; sit_i 4131 fs/f2fs/segment.c end = (start_blk + readed) * sit_i->sents_per_block; sit_i 4137 fs/f2fs/segment.c se = &sit_i->sentries[start]; sit_i 4142 fs/f2fs/segment.c sit = sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, start)]; sit_i 4184 fs/f2fs/segment.c se = &sit_i->sentries[start]; sit_i 4348 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 4351 fs/f2fs/segment.c down_write(&sit_i->sentry_lock); sit_i 4353 fs/f2fs/segment.c sit_i->min_mtime = ULLONG_MAX; sit_i 4364 fs/f2fs/segment.c if (sit_i->min_mtime > mtime) sit_i 4365 fs/f2fs/segment.c sit_i->min_mtime = mtime; sit_i 4367 fs/f2fs/segment.c sit_i->max_mtime = get_mtime(sbi, false); sit_i 4368 fs/f2fs/segment.c up_write(&sit_i->sentry_lock); sit_i 4508 fs/f2fs/segment.c struct sit_info *sit_i = SIT_I(sbi); sit_i 4510 fs/f2fs/segment.c if (!sit_i) sit_i 4513 fs/f2fs/segment.c if (sit_i->sentries) sit_i 4514 fs/f2fs/segment.c kvfree(sit_i->bitmap); sit_i 4515 fs/f2fs/segment.c kvfree(sit_i->tmp_map); sit_i 4517 fs/f2fs/segment.c kvfree(sit_i->sentries); sit_i 4518 fs/f2fs/segment.c kvfree(sit_i->sec_entries); sit_i 4519 fs/f2fs/segment.c kvfree(sit_i->dirty_sentries_bitmap); sit_i 4522 fs/f2fs/segment.c kvfree(sit_i->sit_bitmap); sit_i 4524 fs/f2fs/segment.c kvfree(sit_i->sit_bitmap_mir); sit_i 4525 fs/f2fs/segment.c kvfree(sit_i->invalid_segmap); sit_i 4527 fs/f2fs/segment.c kvfree(sit_i); sit_i 105 fs/f2fs/segment.h #define SIT_ENTRY_OFFSET(sit_i, segno) \ sit_i 106 fs/f2fs/segment.h ((segno) % (sit_i)->sents_per_block) sit_i 322 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 323 fs/f2fs/segment.h return &sit_i->sentries[segno]; sit_i 329 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 330 fs/f2fs/segment.h return &sit_i->sec_entries[GET_SEC_FROM_SEG(sbi, segno)]; sit_i 489 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 492 fs/f2fs/segment.h if (memcmp(sit_i->sit_bitmap, sit_i->sit_bitmap_mir, sit_i 493 fs/f2fs/segment.h sit_i->bitmap_size)) sit_i 496 fs/f2fs/segment.h memcpy(dst_addr, sit_i->sit_bitmap, sit_i->bitmap_size); sit_i 720 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 722 fs/f2fs/segment.h block_t blk_addr = sit_i->sit_base_addr + offset; sit_i 727 fs/f2fs/segment.h if (f2fs_test_bit(offset, sit_i->sit_bitmap) != sit_i 728 fs/f2fs/segment.h f2fs_test_bit(offset, sit_i->sit_bitmap_mir)) sit_i 733 fs/f2fs/segment.h if (f2fs_test_bit(offset, sit_i->sit_bitmap)) sit_i 734 fs/f2fs/segment.h blk_addr += sit_i->sit_blocks; sit_i 742 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 743 fs/f2fs/segment.h block_addr -= sit_i->sit_base_addr; sit_i 744 fs/f2fs/segment.h if (block_addr < sit_i->sit_blocks) sit_i 745 fs/f2fs/segment.h block_addr += sit_i->sit_blocks; sit_i 747 fs/f2fs/segment.h block_addr -= sit_i->sit_blocks; sit_i 749 fs/f2fs/segment.h return block_addr + sit_i->sit_base_addr; sit_i 752 fs/f2fs/segment.h static inline void set_to_next_sit(struct sit_info *sit_i, unsigned int start) sit_i 756 fs/f2fs/segment.h f2fs_change_bit(block_off, sit_i->sit_bitmap); sit_i 758 fs/f2fs/segment.h f2fs_change_bit(block_off, sit_i->sit_bitmap_mir); sit_i 765 fs/f2fs/segment.h struct sit_info *sit_i = SIT_I(sbi); sit_i 768 fs/f2fs/segment.h if (now >= sit_i->mounted_time) sit_i 769 fs/f2fs/segment.h return sit_i->elapsed_time + now - sit_i->mounted_time; sit_i 773 fs/f2fs/segment.h diff = sit_i->mounted_time - now; sit_i 774 fs/f2fs/segment.h if (sit_i->elapsed_time >= diff) sit_i 775 fs/f2fs/segment.h return sit_i->elapsed_time - diff; sit_i 778 fs/f2fs/segment.h return sit_i->elapsed_time;