Home
last modified time | relevance | path

Searched refs:sleb (Results 1 – 8 of 8) sorted by relevance

/linux/fs/ubifs/
H A Dscan.c128 struct ubifs_scan_leb *sleb; in ubifs_start_scan() local
133 sleb = kzalloc_obj(struct ubifs_scan_leb, GFP_NOFS); in ubifs_start_scan()
134 if (!sleb) in ubifs_start_scan()
137 sleb->lnum = lnum; in ubifs_start_scan()
138 INIT_LIST_HEAD(&sleb->nodes); in ubifs_start_scan()
139 sleb->buf = sbuf; in ubifs_start_scan()
145 kfree(sleb); in ubifs_start_scan()
153 return sleb; in ubifs_start_scan()
163 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, in ubifs_end_scan() argument
169 sleb->endpt = ALIGN(offs, c->min_io_size); in ubifs_end_scan()
[all …]
H A Drecovery.c491 static int fix_unclean_leb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in fix_unclean_leb() argument
494 int lnum = sleb->lnum, endpt = start; in fix_unclean_leb()
497 if (!list_empty(&sleb->nodes)) { in fix_unclean_leb()
500 snod = list_entry(sleb->nodes.prev, in fix_unclean_leb()
510 lnum, start, sleb->endpt); in fix_unclean_leb()
522 lnum, start, sleb->endpt); in fix_unclean_leb()
531 err = ubifs_leb_read(c, lnum, sleb->buf, 0, in fix_unclean_leb()
541 void *buf = sleb->buf + len - pad_len; in fix_unclean_leb()
546 err = ubifs_leb_change(c, lnum, sleb->buf, len); in fix_unclean_leb()
562 static void drop_last_group(struct ubifs_scan_leb *sleb, int *offs) in drop_last_group() argument
[all …]
H A Dorphan.c528 static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in do_kill_orphans() argument
543 list_for_each_entry(snod, &sleb->nodes, list) { in do_kill_orphans()
546 snod->type, sleb->lnum, snod->offs); in do_kill_orphans()
575 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
581 dbg_rcvry("out of date LEB %d", sleb->lnum); in do_kill_orphans()
618 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
669 struct ubifs_scan_leb *sleb; in kill_orphans() local
672 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in kill_orphans()
673 if (IS_ERR(sleb)) { in kill_orphans()
674 if (PTR_ERR(sleb) == -EUCLEAN) in kill_orphans()
[all …]
H A Dmaster.c95 struct ubifs_scan_leb *sleb; in scan_for_master() local
101 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
102 if (IS_ERR(sleb)) in scan_for_master()
103 return PTR_ERR(sleb); in scan_for_master()
104 nodes_cnt = sleb->nodes_cnt; in scan_for_master()
106 snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, in scan_for_master()
113 ubifs_scan_destroy(sleb); in scan_for_master()
117 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
118 if (IS_ERR(sleb)) in scan_for_master()
119 return PTR_ERR(sleb); in scan_for_master()
[all …]
H A Dauth.c194 struct ubifs_scan_leb *sleb; in ubifs_sb_verify_signature() local
198 sleb = ubifs_scan(c, UBIFS_SB_LNUM, UBIFS_SB_NODE_SZ, c->sbuf, 0); in ubifs_sb_verify_signature()
199 if (IS_ERR(sleb)) { in ubifs_sb_verify_signature()
200 err = PTR_ERR(sleb); in ubifs_sb_verify_signature()
204 if (sleb->nodes_cnt == 0) { in ubifs_sb_verify_signature()
210 snod = list_first_entry(&sleb->nodes, struct ubifs_scan_node, list); in ubifs_sb_verify_signature()
244 ubifs_scan_destroy(sleb); in ubifs_sb_verify_signature()
H A Dlog.c644 struct ubifs_scan_leb *sleb; in ubifs_consolidate_log() local
658 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_consolidate_log()
659 if (IS_ERR(sleb)) { in ubifs_consolidate_log()
660 err = PTR_ERR(sleb); in ubifs_consolidate_log()
663 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_consolidate_log()
691 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
725 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
H A Dtnc_commit.c226 struct ubifs_scan_leb *sleb; in layout_leb_in_gaps() local
246 sleb = ubifs_scan(c, lnum, 0, c->ileb_buf, 0); in layout_leb_in_gaps()
248 if (IS_ERR(sleb)) in layout_leb_in_gaps()
249 return PTR_ERR(sleb); in layout_leb_in_gaps()
251 list_for_each_entry(snod, &sleb->nodes, list) { in layout_leb_in_gaps()
263 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
279 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
286 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
H A Dlprops.c1020 struct ubifs_scan_leb *sleb; in scan_check_cb() local
1103 sleb = ubifs_scan(c, lnum, 0, buf, 0); in scan_check_cb()
1104 if (IS_ERR(sleb)) { in scan_check_cb()
1105 ret = PTR_ERR(sleb); in scan_check_cb()
1114 list_for_each_entry(snod, &sleb->nodes, list) { in scan_check_cb()
1144 free = c->leb_size - sleb->endpt; in scan_check_cb()
1145 dirty = sleb->endpt - used; in scan_check_cb()
1226 ubifs_scan_destroy(sleb); in scan_check_cb()
1235 ubifs_scan_destroy(sleb); in scan_check_cb()