| /rk3399_rockchip-uboot/fs/ubifs/ |
| H A D | scan.c | 133 struct ubifs_scan_leb *sleb; in ubifs_start_scan() local 138 sleb = kzalloc(sizeof(struct ubifs_scan_leb), GFP_NOFS); in ubifs_start_scan() 139 if (!sleb) in ubifs_start_scan() 142 sleb->lnum = lnum; in ubifs_start_scan() 143 INIT_LIST_HEAD(&sleb->nodes); in ubifs_start_scan() 144 sleb->buf = sbuf; in ubifs_start_scan() 150 kfree(sleb); in ubifs_start_scan() 158 return sleb; in ubifs_start_scan() 168 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, in ubifs_end_scan() argument 175 sleb->endpt = ALIGN(offs, c->min_io_size); in ubifs_end_scan() [all …]
|
| H A D | replay.c | 539 struct ubifs_scan_leb *sleb; in replay_bud() local 552 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead); in replay_bud() 554 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); in replay_bud() 555 if (IS_ERR(sleb)) in replay_bud() 556 return PTR_ERR(sleb); in replay_bud() 580 list_for_each_entry(snod, &sleb->nodes, list) { in replay_bud() 669 ubifs_assert(sleb->endpt - offs >= used); in replay_bud() 670 ubifs_assert(sleb->endpt % c->min_io_size == 0); in replay_bud() 672 b->dirty = sleb->endpt - offs - used; in replay_bud() 673 b->free = c->leb_size - sleb->endpt; in replay_bud() [all …]
|
| H A D | recovery.c | 498 static int fix_unclean_leb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in fix_unclean_leb() argument 501 int lnum = sleb->lnum, endpt = start; in fix_unclean_leb() 504 if (!list_empty(&sleb->nodes)) { in fix_unclean_leb() 507 snod = list_entry(sleb->nodes.prev, in fix_unclean_leb() 517 lnum, start, sleb->endpt); in fix_unclean_leb() 530 lnum, start, sleb->endpt); in fix_unclean_leb() 539 err = ubifs_leb_read(c, lnum, sleb->buf, 0, in fix_unclean_leb() 549 void *buf = sleb->buf + len - pad_len; in fix_unclean_leb() 554 err = ubifs_leb_change(c, lnum, sleb->buf, len); in fix_unclean_leb() 571 static void drop_last_group(struct ubifs_scan_leb *sleb, int *offs) in drop_last_group() argument [all …]
|
| H A D | orphan.c | 550 static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in do_kill_orphans() argument 560 list_for_each_entry(snod, &sleb->nodes, list) { in do_kill_orphans() 563 snod->type, sleb->lnum, snod->offs); in do_kill_orphans() 590 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans() 594 dbg_rcvry("out of date LEB %d", sleb->lnum); in do_kill_orphans() 618 cmt_no, sleb->lnum, snod->offs); in do_kill_orphans() 661 struct ubifs_scan_leb *sleb; in kill_orphans() local 664 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in kill_orphans() 665 if (IS_ERR(sleb)) { in kill_orphans() 666 if (PTR_ERR(sleb) == -EUCLEAN) in kill_orphans() [all …]
|
| H A D | gc.c | 238 static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in sort_nodes() argument 247 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in sort_nodes() 269 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum, in sort_nodes() 289 list_sort(c, &sleb->nodes, &data_nodes_cmp); in sort_nodes() 292 err = dbg_check_data_nodes_order(c, &sleb->nodes); in sort_nodes() 312 static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb, in move_node() argument 322 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum, in move_node() 340 static int move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb) in move_nodes() argument 356 err = sort_nodes(c, sleb, &nondata, &min); in move_nodes() 366 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { in move_nodes() [all …]
|
| H A D | master.c | 32 struct ubifs_scan_leb *sleb; in scan_for_master() local 38 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master() 39 if (IS_ERR(sleb)) in scan_for_master() 40 return PTR_ERR(sleb); in scan_for_master() 41 nodes_cnt = sleb->nodes_cnt; in scan_for_master() 43 snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, in scan_for_master() 50 ubifs_scan_destroy(sleb); in scan_for_master() 54 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master() 55 if (IS_ERR(sleb)) in scan_for_master() 56 return PTR_ERR(sleb); in scan_for_master() [all …]
|
| H A D | log.c | 627 struct ubifs_scan_leb *sleb; in ubifs_consolidate_log() local 641 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_consolidate_log() 642 if (IS_ERR(sleb)) { in ubifs_consolidate_log() 643 err = PTR_ERR(sleb); in ubifs_consolidate_log() 646 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_consolidate_log() 674 ubifs_scan_destroy(sleb); in ubifs_consolidate_log() 708 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
|
| H A D | lprops.c | 1025 struct ubifs_scan_leb *sleb; in scan_check_cb() local 1108 sleb = ubifs_scan(c, lnum, 0, buf, 0); in scan_check_cb() 1109 if (IS_ERR(sleb)) { in scan_check_cb() 1110 ret = PTR_ERR(sleb); in scan_check_cb() 1119 list_for_each_entry(snod, &sleb->nodes, list) { in scan_check_cb() 1149 free = c->leb_size - sleb->endpt; in scan_check_cb() 1150 dirty = sleb->endpt - used; in scan_check_cb() 1231 ubifs_scan_destroy(sleb); in scan_check_cb() 1240 ubifs_scan_destroy(sleb); in scan_check_cb()
|
| H A D | debug.c | 805 const struct ubifs_scan_leb *sleb, int offs) in ubifs_dump_sleb() argument 810 current->pid, sleb->lnum, offs); in ubifs_dump_sleb() 812 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_sleb() 815 sleb->lnum, snod->offs, snod->len); in ubifs_dump_sleb() 822 struct ubifs_scan_leb *sleb; in ubifs_dump_leb() local 834 sleb = ubifs_scan(c, lnum, 0, buf, 0); in ubifs_dump_leb() 835 if (IS_ERR(sleb)) { in ubifs_dump_leb() 836 ubifs_err(c, "scan error %d", (int)PTR_ERR(sleb)); in ubifs_dump_leb() 841 sleb->nodes_cnt, sleb->endpt); in ubifs_dump_leb() 843 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_leb() [all …]
|
| H A D | debug.h | 309 const struct ubifs_scan_leb *sleb, int offs);
|
| H A D | ubifs.h | 2117 void ubifs_scan_destroy(struct ubifs_scan_leb *sleb); 2122 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, 2124 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
|