/linux-master/fs/ubifs/ |
H A D | scan.c | 128 struct ubifs_scan_leb *sleb; local 133 sleb = kzalloc(sizeof(struct ubifs_scan_leb), GFP_NOFS); 134 if (!sleb) 137 sleb->lnum = lnum; 138 INIT_LIST_HEAD(&sleb->nodes); 139 sleb->buf = sbuf; 145 kfree(sleb); 153 return sleb; 159 * @sleb: scanning information 163 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 181 ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, void *buf, int offs) argument 259 struct ubifs_scan_leb *sleb; local 354 ubifs_scan_destroy(struct ubifs_scan_leb *sleb) argument [all...] |
H A D | recovery.c | 488 * @sleb: scanned LEB information 491 static int fix_unclean_leb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 494 int lnum = sleb->lnum, endpt = start; 497 if (!list_empty(&sleb->nodes)) { 500 snod = list_entry(sleb->nodes.prev, 510 lnum, start, sleb->endpt); 522 lnum, start, sleb->endpt); 531 err = ubifs_leb_read(c, lnum, sleb->buf, 0, 541 void *buf = sleb->buf + len - pad_len; 546 err = ubifs_leb_change(c, lnum, sleb 562 drop_last_group(struct ubifs_scan_leb *sleb, int *offs) argument 591 drop_last_node(struct ubifs_scan_leb *sleb, int *offs) argument 627 struct ubifs_scan_leb *sleb; local 859 struct ubifs_scan_leb *sleb; local [all...] |
H A D | replay.c | 579 * @sleb: the scan LEB to authenticate 592 static int authenticate_sleb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 603 return sleb->nodes_cnt; 605 list_for_each_entry(snod, &sleb->nodes, list) { 644 n_not_auth, sleb->lnum); 648 n_not_auth, sleb->lnum); 672 struct ubifs_scan_leb *sleb; local 685 sleb = ubifs_recover_leb(c, lnum, offs, c->sbuf, b->bud->jhead); 687 sleb = ubifs_scan(c, lnum, offs, c->sbuf, 0); 688 if (IS_ERR(sleb)) 986 struct ubifs_scan_leb *sleb; local [all...] |
H A D | orphan.c | 621 * @sleb: scanned LEB 630 static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 645 list_for_each_entry(snod, &sleb->nodes, list) { 648 snod->type, sleb->lnum, snod->offs); 677 cmt_no, sleb->lnum, snod->offs); 683 dbg_rcvry("out of date LEB %d", sleb->lnum); 727 cmt_no, sleb->lnum, snod->offs); 778 struct ubifs_scan_leb *sleb; local 781 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); 782 if (IS_ERR(sleb)) { 952 dbg_read_orphans(struct check_info *ci, struct ubifs_scan_leb *sleb) argument 991 struct ubifs_scan_leb *sleb; local [all...] |
H A D | master.c | 92 struct ubifs_scan_leb *sleb; local 98 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); 99 if (IS_ERR(sleb)) 100 return PTR_ERR(sleb); 101 nodes_cnt = sleb->nodes_cnt; 103 snod = list_entry(sleb->nodes.prev, struct ubifs_scan_node, 110 ubifs_scan_destroy(sleb); 114 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); 115 if (IS_ERR(sleb)) 116 return PTR_ERR(sleb); [all...] |
H A D | gc.c | 204 * @sleb: describes nodes to sort and contains the result on exit 210 * @sleb->nodes and @nondata lists correspondingly. 228 static int sort_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 237 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) { 260 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum, 280 list_sort(c, &sleb->nodes, &data_nodes_cmp); 283 err = dbg_check_data_nodes_order(c, &sleb->nodes); 295 * @sleb: describes the LEB to move nodes from 303 static int move_node(struct ubifs_info *c, struct ubifs_scan_leb *sleb, argument 313 err = ubifs_tnc_replace(c, &snod->key, sleb 331 move_nodes(struct ubifs_info *c, struct ubifs_scan_leb *sleb) argument 493 struct ubifs_scan_leb *sleb; local [all...] |
H A D | auth.c | 194 struct ubifs_scan_leb *sleb; local 198 sleb = ubifs_scan(c, UBIFS_SB_LNUM, UBIFS_SB_NODE_SZ, c->sbuf, 0); 199 if (IS_ERR(sleb)) { 200 err = PTR_ERR(sleb); 204 if (sleb->nodes_cnt == 0) { 210 snod = list_first_entry(&sleb->nodes, struct ubifs_scan_node, list); 244 ubifs_scan_destroy(sleb);
|
H A D | log.c | 644 struct ubifs_scan_leb *sleb; local 658 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 0); 659 if (IS_ERR(sleb)) { 660 err = PTR_ERR(sleb); 663 list_for_each_entry(snod, &sleb->nodes, list) { 691 ubifs_scan_destroy(sleb); 725 ubifs_scan_destroy(sleb);
|
H A D | tnc_commit.c | 226 struct ubifs_scan_leb *sleb; local 246 sleb = ubifs_scan(c, lnum, 0, c->ileb_buf, 0); 248 if (IS_ERR(sleb)) 249 return PTR_ERR(sleb); 251 list_for_each_entry(snod, &sleb->nodes, list) { 263 ubifs_scan_destroy(sleb); 279 ubifs_scan_destroy(sleb); 286 ubifs_scan_destroy(sleb);
|
H A D | lprops.c | 1020 struct ubifs_scan_leb *sleb; local 1103 sleb = ubifs_scan(c, lnum, 0, buf, 0); 1104 if (IS_ERR(sleb)) { 1105 ret = PTR_ERR(sleb); 1114 list_for_each_entry(snod, &sleb->nodes, list) { 1144 free = c->leb_size - sleb->endpt; 1145 dirty = sleb->endpt - used; 1226 ubifs_scan_destroy(sleb); 1235 ubifs_scan_destroy(sleb);
|
H A D | debug.c | 833 struct ubifs_scan_leb *sleb; local 845 sleb = ubifs_scan(c, lnum, 0, buf, 0); 846 if (IS_ERR(sleb)) { 847 ubifs_err(c, "scan error %d", (int)PTR_ERR(sleb)); 852 sleb->nodes_cnt, sleb->endpt); 854 list_for_each_entry(snod, &sleb->nodes, list) { 862 ubifs_scan_destroy(sleb);
|
H A D | ubifs.h | 1780 void ubifs_scan_destroy(struct ubifs_scan_leb *sleb); 1785 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, 1787 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
|