Home
last modified time | relevance | path

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

/linux-4.1.27/fs/ubifs/
Dscan.c140 struct ubifs_scan_leb *sleb; in ubifs_start_scan() local
145 sleb = kzalloc(sizeof(struct ubifs_scan_leb), GFP_NOFS); in ubifs_start_scan()
146 if (!sleb) in ubifs_start_scan()
149 sleb->lnum = lnum; in ubifs_start_scan()
150 INIT_LIST_HEAD(&sleb->nodes); in ubifs_start_scan()
151 sleb->buf = sbuf; in ubifs_start_scan()
157 kfree(sleb); in ubifs_start_scan()
165 return sleb; in ubifs_start_scan()
175 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, in ubifs_end_scan() argument
182 sleb->endpt = ALIGN(offs, c->min_io_size); in ubifs_end_scan()
[all …]
Dreplay.c545 struct ubifs_scan_leb *sleb; in replay_bud() local
558 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead); in replay_bud()
560 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); in replay_bud()
561 if (IS_ERR(sleb)) in replay_bud()
562 return PTR_ERR(sleb); in replay_bud()
586 list_for_each_entry(snod, &sleb->nodes, list) { in replay_bud()
675 ubifs_assert(sleb->endpt - offs >= used); in replay_bud()
676 ubifs_assert(sleb->endpt % c->min_io_size == 0); in replay_bud()
678 b->dirty = sleb->endpt - offs - used; in replay_bud()
679 b->free = c->leb_size - sleb->endpt; in replay_bud()
[all …]
Drecovery.c503 static int fix_unclean_leb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in fix_unclean_leb() argument
506 int lnum = sleb->lnum, endpt = start; in fix_unclean_leb()
509 if (!list_empty(&sleb->nodes)) { in fix_unclean_leb()
512 snod = list_entry(sleb->nodes.prev, in fix_unclean_leb()
522 lnum, start, sleb->endpt); in fix_unclean_leb()
534 lnum, start, sleb->endpt); in fix_unclean_leb()
543 err = ubifs_leb_read(c, lnum, sleb->buf, 0, in fix_unclean_leb()
553 void *buf = sleb->buf + len - pad_len; in fix_unclean_leb()
558 err = ubifs_leb_change(c, lnum, sleb->buf, len); in fix_unclean_leb()
574 static void drop_last_group(struct ubifs_scan_leb *sleb, int *offs) in drop_last_group() argument
[all …]
Dorphan.c560 static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in do_kill_orphans() argument
570 list_for_each_entry(snod, &sleb->nodes, list) { in do_kill_orphans()
573 snod->type, sleb->lnum, snod->offs); in do_kill_orphans()
600 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
604 dbg_rcvry("out of date LEB %d", sleb->lnum); in do_kill_orphans()
628 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans()
671 struct ubifs_scan_leb *sleb; in kill_orphans() local
674 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in kill_orphans()
675 if (IS_ERR(sleb)) { in kill_orphans()
676 if (PTR_ERR(sleb) == -EUCLEAN) in kill_orphans()
[all …]
Dgc.c247 static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in sort_nodes() argument
256 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in sort_nodes()
278 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum, in sort_nodes()
298 list_sort(c, &sleb->nodes, &data_nodes_cmp); in sort_nodes()
301 err = dbg_check_data_nodes_order(c, &sleb->nodes); in sort_nodes()
321 static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in move_node() argument
331 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum, in move_node()
349 static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb) in move_nodes() argument
365 err = sort_nodes(c, sleb, &nondata, &min); in move_nodes()
375 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in move_nodes()
[all …]
Dmaster.c38 struct ubifs_scan_leb *sleb; in scan_for_master() local
44 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
45 if (IS_ERR(sleb)) in scan_for_master()
46 return PTR_ERR(sleb); in scan_for_master()
47 nodes_cnt = sleb->nodes_cnt; in scan_for_master()
49 snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, in scan_for_master()
56 ubifs_scan_destroy(sleb); in scan_for_master()
60 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
61 if (IS_ERR(sleb)) in scan_for_master()
62 return PTR_ERR(sleb); in scan_for_master()
[all …]
Dlog.c635 struct ubifs_scan_leb *sleb; in ubifs_consolidate_log() local
649 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_consolidate_log()
650 if (IS_ERR(sleb)) { in ubifs_consolidate_log()
651 err = PTR_ERR(sleb); in ubifs_consolidate_log()
654 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_consolidate_log()
682 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
716 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
Dtnc_commit.c231 struct ubifs_scan_leb *sleb; in layout_leb_in_gaps() local
251 sleb = ubifs_scan(c, lnum, 0, c->ileb_buf, 0); in layout_leb_in_gaps()
253 if (IS_ERR(sleb)) in layout_leb_in_gaps()
254 return PTR_ERR(sleb); in layout_leb_in_gaps()
256 list_for_each_entry(snod, &sleb->nodes, list) { in layout_leb_in_gaps()
268 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
284 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
291 ubifs_scan_destroy(sleb); in layout_leb_in_gaps()
Dlprops.c1033 struct ubifs_scan_leb *sleb; in scan_check_cb() local
1116 sleb = ubifs_scan(c, lnum, 0, buf, 0); in scan_check_cb()
1117 if (IS_ERR(sleb)) { in scan_check_cb()
1118 ret = PTR_ERR(sleb); in scan_check_cb()
1127 list_for_each_entry(snod, &sleb->nodes, list) { in scan_check_cb()
1157 free = c->leb_size - sleb->endpt; in scan_check_cb()
1158 dirty = sleb->endpt - used; in scan_check_cb()
1239 ubifs_scan_destroy(sleb); in scan_check_cb()
1248 ubifs_scan_destroy(sleb); in scan_check_cb()
Ddebug.c797 const struct ubifs_scan_leb *sleb, int offs) in ubifs_dump_sleb() argument
802 current->pid, sleb->lnum, offs); in ubifs_dump_sleb()
804 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_sleb()
807 sleb->lnum, snod->offs, snod->len); in ubifs_dump_sleb()
814 struct ubifs_scan_leb *sleb; in ubifs_dump_leb() local
826 sleb = ubifs_scan(c, lnum, 0, buf, 0); in ubifs_dump_leb()
827 if (IS_ERR(sleb)) { in ubifs_dump_leb()
828 ubifs_err(c, "scan error %d", (int)PTR_ERR(sleb)); in ubifs_dump_leb()
833 sleb->nodes_cnt, sleb->endpt); in ubifs_dump_leb()
835 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_leb()
[all …]
Dubifs.h1516 void ubifs_scan_destroy(struct ubifs_scan_leb *sleb);
1521 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
1523 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
Ddebug.h265 const struct ubifs_scan_leb *sleb, int offs);