/openbmc/u-boot/fs/ubifs/ |
H A D | scan.c | 138 if (!sleb) in ubifs_start_scan() 141 sleb->lnum = lnum; in ubifs_start_scan() 143 sleb->buf = sbuf; in ubifs_start_scan() 149 kfree(sleb); in ubifs_start_scan() 157 return sleb; in ubifs_start_scan() 219 sleb->nodes_cnt += 1; in ubifs_add_snod() 267 if (IS_ERR(sleb)) in ubifs_scan() 268 return sleb; in ubifs_scan() 338 return sleb; in ubifs_scan() 364 head = &sleb->nodes; in ubifs_scan_destroy() [all …]
|
H A D | replay.c | 554 if (IS_ERR(sleb)) in replay_bud() 555 return PTR_ERR(sleb); in replay_bud() 677 ubifs_scan_destroy(sleb); in replay_bud() 683 ubifs_scan_destroy(sleb); in replay_bud() 828 if (IS_ERR(sleb)) { in replay_log_leb() 830 return PTR_ERR(sleb); in replay_log_leb() 837 if (IS_ERR(sleb)) in replay_log_leb() 838 return PTR_ERR(sleb); in replay_log_leb() 846 node = sleb->buf; in replay_log_leb() 945 err = !sleb->endpt; in replay_log_leb() [all …]
|
H A D | recovery.c | 583 sleb->lnum, snod->offs); in drop_last_group() 587 sleb->nodes_cnt -= 1; in drop_last_group() 612 sleb->nodes_cnt -= 1; in drop_last_node() 641 if (IS_ERR(sleb)) in ubifs_recover_leb() 642 return sleb; in ubifs_recover_leb() 783 return sleb; in ubifs_recover_leb() 794 ubifs_scan_destroy(sleb); in ubifs_recover_leb() 880 if (IS_ERR(sleb)) in ubifs_recover_log_leb() 881 return sleb; in ubifs_recover_log_leb() 882 if (sleb->nodes_cnt) { in ubifs_recover_log_leb() [all …]
|
H A D | orphan.c | 660 struct ubifs_scan_leb *sleb; in kill_orphans() local 664 if (IS_ERR(sleb)) { in kill_orphans() 668 if (IS_ERR(sleb)) { in kill_orphans() 669 err = PTR_ERR(sleb); in kill_orphans() 676 ubifs_scan_destroy(sleb); in kill_orphans() 679 if (sleb->endpt) { in kill_orphans() 683 ubifs_scan_destroy(sleb); in kill_orphans() 884 struct ubifs_scan_leb *sleb; in dbg_scan_orphans() local 887 if (IS_ERR(sleb)) { in dbg_scan_orphans() 888 err = PTR_ERR(sleb); in dbg_scan_orphans() [all …]
|
H A D | gc.c | 355 err = sort_nodes(c, sleb, &nondata, &min); in move_nodes() 374 err = move_node(c, sleb, snod, wbuf); in move_nodes() 399 err = move_node(c, sleb, snod, wbuf); in move_nodes() 419 list_splice_tail(&nondata, &sleb->nodes); in move_nodes() 461 struct ubifs_scan_leb *sleb; in ubifs_garbage_collect_leb() local 506 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_garbage_collect_leb() 507 if (IS_ERR(sleb)) in ubifs_garbage_collect_leb() 508 return PTR_ERR(sleb); in ubifs_garbage_collect_leb() 510 ubifs_assert(!list_empty(&sleb->nodes)); in ubifs_garbage_collect_leb() 555 err = move_nodes(c, sleb); in ubifs_garbage_collect_leb() [all …]
|
H A D | master.c | 31 struct ubifs_scan_leb *sleb; in scan_for_master() local 38 if (IS_ERR(sleb)) in scan_for_master() 39 return PTR_ERR(sleb); in scan_for_master() 40 nodes_cnt = sleb->nodes_cnt; in scan_for_master() 49 ubifs_scan_destroy(sleb); in scan_for_master() 54 if (IS_ERR(sleb)) in scan_for_master() 55 return PTR_ERR(sleb); in scan_for_master() 58 if (!sleb->nodes_cnt) in scan_for_master() 70 ubifs_scan_destroy(sleb); in scan_for_master() 74 ubifs_scan_destroy(sleb); in scan_for_master() [all …]
|
H A D | log.c | 626 struct ubifs_scan_leb *sleb; in ubifs_consolidate_log() local 640 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_consolidate_log() 641 if (IS_ERR(sleb)) { in ubifs_consolidate_log() 642 err = PTR_ERR(sleb); in ubifs_consolidate_log() 645 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_consolidate_log() 673 ubifs_scan_destroy(sleb); in ubifs_consolidate_log() 707 ubifs_scan_destroy(sleb); in ubifs_consolidate_log()
|
H A D | lprops.c | 1024 struct ubifs_scan_leb *sleb; in scan_check_cb() local 1107 sleb = ubifs_scan(c, lnum, 0, buf, 0); in scan_check_cb() 1108 if (IS_ERR(sleb)) { in scan_check_cb() 1109 ret = PTR_ERR(sleb); in scan_check_cb() 1118 list_for_each_entry(snod, &sleb->nodes, list) { in scan_check_cb() 1148 free = c->leb_size - sleb->endpt; in scan_check_cb() 1149 dirty = sleb->endpt - used; in scan_check_cb() 1230 ubifs_scan_destroy(sleb); in scan_check_cb() 1239 ubifs_scan_destroy(sleb); in scan_check_cb()
|
H A D | debug.c | 804 const struct ubifs_scan_leb *sleb, int offs) in ubifs_dump_sleb() argument 809 current->pid, sleb->lnum, offs); in ubifs_dump_sleb() 811 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_sleb() 814 sleb->lnum, snod->offs, snod->len); in ubifs_dump_sleb() 821 struct ubifs_scan_leb *sleb; in ubifs_dump_leb() local 833 sleb = ubifs_scan(c, lnum, 0, buf, 0); in ubifs_dump_leb() 834 if (IS_ERR(sleb)) { in ubifs_dump_leb() 835 ubifs_err(c, "scan error %d", (int)PTR_ERR(sleb)); in ubifs_dump_leb() 840 sleb->nodes_cnt, sleb->endpt); in ubifs_dump_leb() 842 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_leb() [all …]
|
H A D | debug.h | 319 const struct ubifs_scan_leb *sleb, int offs);
|
H A D | ubifs.h | 2116 void ubifs_scan_destroy(struct ubifs_scan_leb *sleb); 2121 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, 2123 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
|
/openbmc/linux/fs/ubifs/ |
H A D | scan.c | 134 if (!sleb) in ubifs_start_scan() 137 sleb->lnum = lnum; 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() 214 sleb->nodes_cnt += 1; in ubifs_add_snod() 262 if (IS_ERR(sleb)) in ubifs_scan() 263 return sleb; in ubifs_scan() 333 return sleb; in ubifs_scan() 359 head = &sleb->nodes; in ubifs_scan_destroy() [all …]
|
H A D | replay.c | 602 return sleb->nodes_cnt; in authenticate_sleb() 687 if (IS_ERR(sleb)) in replay_bud() 688 return PTR_ERR(sleb); in replay_bud() 828 ubifs_scan_destroy(sleb); in replay_bud() 834 ubifs_scan_destroy(sleb); in replay_bud() 991 if (IS_ERR(sleb)) { in replay_log_leb() 993 return PTR_ERR(sleb); in replay_log_leb() 1000 if (IS_ERR(sleb)) in replay_log_leb() 1001 return PTR_ERR(sleb); in replay_log_leb() 1009 node = sleb->buf; in replay_log_leb() [all …]
|
H A D | recovery.c | 575 sleb->lnum, snod->offs); in drop_last_group() 579 sleb->nodes_cnt -= 1; in drop_last_group() 604 sleb->nodes_cnt -= 1; in drop_last_node() 633 if (IS_ERR(sleb)) in ubifs_recover_leb() 634 return sleb; in ubifs_recover_leb() 775 return sleb; in ubifs_recover_leb() 786 ubifs_scan_destroy(sleb); in ubifs_recover_leb() 872 if (IS_ERR(sleb)) in ubifs_recover_log_leb() 873 return sleb; in ubifs_recover_log_leb() 874 if (sleb->nodes_cnt) { in ubifs_recover_log_leb() [all …]
|
H A D | gc.c | 347 err = sort_nodes(c, sleb, &nondata, &min); in move_nodes() 372 err = move_node(c, sleb, snod, wbuf); in move_nodes() 404 err = move_node(c, sleb, snod, wbuf); in move_nodes() 451 list_splice_tail(&nondata, &sleb->nodes); in move_nodes() 493 struct ubifs_scan_leb *sleb; in ubifs_garbage_collect_leb() local 538 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); in ubifs_garbage_collect_leb() 539 if (IS_ERR(sleb)) in ubifs_garbage_collect_leb() 540 return PTR_ERR(sleb); in ubifs_garbage_collect_leb() 542 ubifs_assert(c, !list_empty(&sleb->nodes)); in ubifs_garbage_collect_leb() 587 err = move_nodes(c, sleb); in ubifs_garbage_collect_leb() [all …]
|
H A D | orphan.c | 778 struct ubifs_scan_leb *sleb; in kill_orphans() local 782 if (IS_ERR(sleb)) { in kill_orphans() 786 if (IS_ERR(sleb)) { in kill_orphans() 787 err = PTR_ERR(sleb); in kill_orphans() 794 ubifs_scan_destroy(sleb); in kill_orphans() 797 if (sleb->endpt) { in kill_orphans() 801 ubifs_scan_destroy(sleb); in kill_orphans() 991 struct ubifs_scan_leb *sleb; in dbg_scan_orphans() local 994 if (IS_ERR(sleb)) { in dbg_scan_orphans() 995 err = PTR_ERR(sleb); in dbg_scan_orphans() [all …]
|
H A D | master.c | 92 struct ubifs_scan_leb *sleb; in scan_for_master() local 99 if (IS_ERR(sleb)) in scan_for_master() 100 return PTR_ERR(sleb); in scan_for_master() 101 nodes_cnt = sleb->nodes_cnt; in scan_for_master() 110 ubifs_scan_destroy(sleb); in scan_for_master() 115 if (IS_ERR(sleb)) in scan_for_master() 116 return PTR_ERR(sleb); in scan_for_master() 119 if (!sleb->nodes_cnt) in scan_for_master() 130 ubifs_scan_destroy(sleb); in scan_for_master() 154 ubifs_scan_destroy(sleb); in scan_for_master() [all …]
|
H A D | auth.c | 195 struct ubifs_scan_leb *sleb; in ubifs_sb_verify_signature() local 199 sleb = ubifs_scan(c, UBIFS_SB_LNUM, UBIFS_SB_NODE_SZ, c->sbuf, 0); in ubifs_sb_verify_signature() 200 if (IS_ERR(sleb)) { in ubifs_sb_verify_signature() 201 err = PTR_ERR(sleb); in ubifs_sb_verify_signature() 205 if (sleb->nodes_cnt == 0) { in ubifs_sb_verify_signature() 211 snod = list_first_entry(&sleb->nodes, struct ubifs_scan_node, list); in ubifs_sb_verify_signature() 245 ubifs_scan_destroy(sleb); in ubifs_sb_verify_signature()
|
H A D | log.c | 644 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 D | tnc_commit.c | 226 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 D | lprops.c | 1019 struct ubifs_scan_leb *sleb; in scan_check_cb() local 1102 sleb = ubifs_scan(c, lnum, 0, buf, 0); in scan_check_cb() 1103 if (IS_ERR(sleb)) { in scan_check_cb() 1104 ret = PTR_ERR(sleb); in scan_check_cb() 1113 list_for_each_entry(snod, &sleb->nodes, list) { in scan_check_cb() 1143 free = c->leb_size - sleb->endpt; in scan_check_cb() 1144 dirty = sleb->endpt - used; in scan_check_cb() 1225 ubifs_scan_destroy(sleb); in scan_check_cb() 1234 ubifs_scan_destroy(sleb); in scan_check_cb()
|
H A D | debug.c | 833 struct ubifs_scan_leb *sleb; in ubifs_dump_leb() local 845 sleb = ubifs_scan(c, lnum, 0, buf, 0); in ubifs_dump_leb() 846 if (IS_ERR(sleb)) { in ubifs_dump_leb() 847 ubifs_err(c, "scan error %d", (int)PTR_ERR(sleb)); in ubifs_dump_leb() 852 sleb->nodes_cnt, sleb->endpt); in ubifs_dump_leb() 854 list_for_each_entry(snod, &sleb->nodes, list) { in ubifs_dump_leb() 862 ubifs_scan_destroy(sleb); in ubifs_dump_leb()
|
H A D | ubifs.h | 1776 void ubifs_scan_destroy(struct ubifs_scan_leb *sleb); 1781 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, 1783 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
|