Home
last modified time | relevance | path

Searched refs:segno (Results 1 – 14 of 14) sorted by relevance

/fs/f2fs/
Dsegment.h24 #define GET_L2R_SEGNO(free_i, segno) ((segno) - (free_i)->start_segno) argument
25 #define GET_R2L_SEGNO(free_i, segno) ((segno) + (free_i)->start_segno) argument
35 (((seg) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \
36 ((seg) == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno) || \
37 ((seg) == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno) || \
38 ((seg) == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno) || \
39 ((seg) == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno) || \
40 ((seg) == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno))
43 (((secno) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno / \
45 ((secno) == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno / \
[all …]
Dgc.c247 static unsigned int get_cb_cost(struct f2fs_sb_info *sbi, unsigned int segno) in get_cb_cost() argument
250 unsigned int secno = GET_SEC_FROM_SEG(sbi, segno); in get_cb_cost()
260 vblocks = get_valid_blocks(sbi, segno, true); in get_cb_cost()
280 unsigned int segno, struct victim_sel_policy *p) in get_gc_cost() argument
283 return get_seg_entry(sbi, segno)->ckpt_valid_blocks; in get_gc_cost()
287 return get_valid_blocks(sbi, segno, true); in get_gc_cost()
289 return get_cb_cost(sbi, segno); in get_gc_cost()
350 unsigned int segno; in get_victim_by_default() local
352 segno = find_next_bit(p.dirty_segmap, last_segment, p.offset); in get_victim_by_default()
353 if (segno >= last_segment) { in get_victim_by_default()
[all …]
Dsegment.c726 static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno, in __locate_dirty_segment() argument
732 if (IS_CURSEG(sbi, segno)) in __locate_dirty_segment()
735 if (!test_and_set_bit(segno, dirty_i->dirty_segmap[dirty_type])) in __locate_dirty_segment()
739 struct seg_entry *sentry = get_seg_entry(sbi, segno); in __locate_dirty_segment()
746 if (!test_and_set_bit(segno, dirty_i->dirty_segmap[t])) in __locate_dirty_segment()
751 static void __remove_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno, in __remove_dirty_segment() argument
756 if (test_and_clear_bit(segno, dirty_i->dirty_segmap[dirty_type])) in __remove_dirty_segment()
760 struct seg_entry *sentry = get_seg_entry(sbi, segno); in __remove_dirty_segment()
763 if (test_and_clear_bit(segno, dirty_i->dirty_segmap[t])) in __remove_dirty_segment()
766 if (get_valid_blocks(sbi, segno, true) == 0) in __remove_dirty_segment()
[all …]
Ddebug.c117 si->curseg[i] = curseg->segno; in update_general_status()
118 si->cursec[i] = GET_SEC_FROM_SEG(sbi, curseg->segno); in update_general_status()
138 unsigned int segno, vblocks; in update_sit_info() local
145 for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { in update_sit_info()
146 vblocks = get_valid_blocks(sbi, segno, true); in update_sit_info()
Drecovery.c333 unsigned int segno = GET_SEGNO(sbi, blkaddr); in check_index_in_prev_nodes() local
345 sentry = get_seg_entry(sbi, segno); in check_index_in_prev_nodes()
352 if (curseg->segno == segno) { in check_index_in_prev_nodes()
358 sum_page = get_sum_page(sbi, segno); in check_index_in_prev_nodes()
Df2fs.h330 #define segno_in_journal(jnl, i) ((jnl)->sit_j.entries[i].segno)
2781 unsigned int segno, struct f2fs_summary_block *sum);
2816 struct page *get_sum_page(struct f2fs_sb_info *sbi, unsigned int segno);
2941 unsigned int segno);
Dnode.c2372 unsigned int segno, struct f2fs_summary_block *sum) in restore_node_summary() argument
2381 addr = START_BLOCK(sbi, segno); in restore_node_summary()
/fs/logfs/
Dgc.c65 static int segment_is_reserved(struct super_block *sb, u32 segno) in segment_is_reserved() argument
73 reserved = btree_lookup32(&super->s_reserved_segments, segno); in segment_is_reserved()
80 if (area->a_is_open && area->a_segno == segno) in segment_is_reserved()
87 static void logfs_mark_segment_bad(struct super_block *sb, u32 segno) in logfs_mark_segment_bad() argument
96 static u32 logfs_valid_bytes(struct super_block *sb, u32 segno, u32 *ec, in logfs_valid_bytes() argument
102 logfs_get_segment_entry(sb, segno, &se); in logfs_valid_bytes()
125 static u32 logfs_gc_segment(struct super_block *sb, u32 segno) in logfs_gc_segment() argument
135 LOGFS_BUG_ON(segment_is_reserved(sb, segno), sb); in logfs_gc_segment()
137 btree_insert32(&super->s_reserved_segments, segno, (void *)1, GFP_NOFS); in logfs_gc_segment()
138 err = wbuf_read(sb, dev_ofs(sb, segno, 0), sizeof(sh), &sh); in logfs_gc_segment()
[all …]
Dsuper.c58 u32 segno; in dump_segfile() local
60 for (segno = 0; segno < super->s_no_segs; segno++) { in dump_segfile()
61 logfs_get_segment_entry(sb, segno, &se); in dump_segfile()
62 printk("%3x: %6x %8x", segno, be32_to_cpu(se.ec_level), in dump_segfile()
64 if (++segno < super->s_no_segs) { in dump_segfile()
65 logfs_get_segment_entry(sb, segno, &se); in dump_segfile()
69 if (++segno < super->s_no_segs) { in dump_segfile()
70 logfs_get_segment_entry(sb, segno, &se); in dump_segfile()
74 if (++segno < super->s_no_segs) { in dump_segfile()
75 logfs_get_segment_entry(sb, segno, &se); in dump_segfile()
[all …]
Djournal.c129 area->a_segno = be32_to_cpu(a->segno); in read_area()
260 static int logfs_read_segment(struct super_block *sb, u32 segno) in logfs_read_segment() argument
264 u64 ofs, seg_ofs = dev_ofs(sb, segno, 0); in logfs_read_segment()
307 super->s_journal_area->a_segno = segno; in logfs_read_segment()
311 static u64 read_gec(struct super_block *sb, u32 segno) in read_gec() argument
317 if (!segno) in read_gec()
319 err = wbuf_read(sb, dev_ofs(sb, segno, 0), sizeof(sh), &sh); in read_gec()
335 u32 segno; in logfs_read_journal() local
341 segno = super->s_journal_seg[i]; in logfs_read_journal()
406 u.sh.segno = cpu_to_be32(area->a_segno); in journal_erase_segment()
[all …]
Dlogfs.h191 u32 segno; member
564 void logfs_get_segment_entry(struct super_block *sb, u32 segno,
567 void logfs_set_segment_erased(struct super_block *sb, u32 segno, u32 ec,
569 void logfs_set_segment_reserved(struct super_block *sb, u32 segno);
570 void logfs_set_segment_unreserved(struct super_block *sb, u32 segno, u32 ec);
597 void freeseg(struct super_block *sb, u32 segno);
667 static inline u64 dev_ofs(struct super_block *sb, u32 segno, u32 ofs) in dev_ofs() argument
669 return ((u64)segno << logfs_super(sb)->s_segshift) + ofs; in dev_ofs()
Dlogfs_abi.h189 __be32 segno; member
465 __be32 segno; member
555 __be32 segno; member
Dsegment.c15 static int logfs_mark_segment_bad(struct super_block *sb, u32 segno) in logfs_mark_segment_bad() argument
21 err = btree_insert32(head, segno, (void *)1, GFP_NOFS); in logfs_mark_segment_bad()
29 int logfs_erase_segment(struct super_block *sb, u32 segno, int ensure_erase) in logfs_erase_segment() argument
35 return super->s_devops->erase(sb, (u64)segno << super->s_segshift, in logfs_erase_segment()
711 void freeseg(struct super_block *sb, u32 segno) in freeseg() argument
718 start = dev_ofs(sb, segno, 0); in freeseg()
719 end = dev_ofs(sb, segno + 1, 0); in freeseg()
839 sh.segno = cpu_to_be32(area->a_segno); in ostore_erase_segment()
Dreadwrite.c1239 static void mark_segment(struct shadow_tree *tree, u32 segno) in mark_segment() argument
1243 if (!btree_lookup32(&tree->segment_map, segno)) { in mark_segment()
1244 err = btree_insert32(&tree->segment_map, segno, (void *)1, in mark_segment()
2027 static void logfs_mod_segment_entry(struct super_block *sb, u32 segno, in logfs_mod_segment_entry() argument
2039 page_no = segno >> (sb->s_blocksize_bits - 3); in logfs_mod_segment_entry()
2040 child_no = segno & ((sb->s_blocksize >> 3) - 1); in logfs_mod_segment_entry()
2068 void logfs_get_segment_entry(struct super_block *sb, u32 segno, in logfs_get_segment_entry() argument
2071 logfs_mod_segment_entry(sb, segno, 0, __get_segment_entry, (long)se); in logfs_get_segment_entry()
2086 u32 segno = ofs >> super->s_segshift; in logfs_set_segment_used() local
2091 logfs_mod_segment_entry(sb, segno, 1, __set_segment_used, increment); in logfs_set_segment_used()
[all …]