Lines Matching refs:e
1053 struct ubi_wl_entry *e; in ubi_scan_fastmap() local
1055 e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL); in ubi_scan_fastmap()
1056 if (!e) { in ubi_scan_fastmap()
1058 kfree(fm->e[i]); in ubi_scan_fastmap()
1064 e->pnum = be32_to_cpu(fmsb2->block_loc[i]); in ubi_scan_fastmap()
1065 e->ec = be32_to_cpu(fmsb2->block_ec[i]); in ubi_scan_fastmap()
1066 fm->e[i] = e; in ubi_scan_fastmap()
1243 wl_e = ubi_wrk->e; in ubi_write_fastmap()
1300 dbg_bld("writing fastmap SB to PEB %i", new_fm->e[0]->pnum); in ubi_write_fastmap()
1301 ret = ubi_io_write_vid_hdr(ubi, new_fm->e[0]->pnum, avhdr); in ubi_write_fastmap()
1308 fmsb->block_loc[i] = cpu_to_be32(new_fm->e[i]->pnum); in ubi_write_fastmap()
1309 set_seen(ubi, new_fm->e[i]->pnum, seen_pebs); in ubi_write_fastmap()
1310 fmsb->block_ec[i] = cpu_to_be32(new_fm->e[i]->ec); in ubi_write_fastmap()
1321 new_fm->e[i]->pnum, be64_to_cpu(dvhdr->sqnum)); in ubi_write_fastmap()
1322 ret = ubi_io_write_vid_hdr(ubi, new_fm->e[i]->pnum, dvhdr); in ubi_write_fastmap()
1325 new_fm->e[i]->pnum); in ubi_write_fastmap()
1332 new_fm->e[i]->pnum, ubi->leb_start, ubi->leb_size); in ubi_write_fastmap()
1335 new_fm->e[i]->pnum); in ubi_write_fastmap()
1417 struct ubi_wl_entry *e; in invalidate_fastmap() local
1435 e = ubi_wl_get_fm_peb(ubi, 1); in invalidate_fastmap()
1436 if (!e) in invalidate_fastmap()
1444 ret = ubi_io_write_vid_hdr(ubi, e->pnum, vh); in invalidate_fastmap()
1446 ubi_wl_put_fm_peb(ubi, e, 0, 0); in invalidate_fastmap()
1451 fm->e[0] = e; in invalidate_fastmap()
1479 if (fm->e[i]) { in return_fm_pebs()
1480 ubi_wl_put_fm_peb(ubi, fm->e[i], i, in return_fm_pebs()
1482 fm->e[i] = NULL; in return_fm_pebs()
1537 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1538 ret = erase_block(ubi, old_fm->e[i]->pnum); in ubi_update_fastmap()
1543 ubi_wl_put_fm_peb(ubi, new_fm->e[j], in ubi_update_fastmap()
1545 new_fm->e[j] = NULL; in ubi_update_fastmap()
1549 new_fm->e[i] = old_fm->e[i]; in ubi_update_fastmap()
1550 old_fm->e[i] = NULL; in ubi_update_fastmap()
1555 ubi_wl_put_fm_peb(ubi, new_fm->e[j], j, 0); in ubi_update_fastmap()
1556 new_fm->e[j] = NULL; in ubi_update_fastmap()
1563 new_fm->e[i] = tmp_e; in ubi_update_fastmap()
1565 if (old_fm && old_fm->e[i]) { in ubi_update_fastmap()
1566 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1568 old_fm->e[i] = NULL; in ubi_update_fastmap()
1576 ubi_wl_put_fm_peb(ubi, old_fm->e[i], i, in ubi_update_fastmap()
1578 old_fm->e[i] = NULL; in ubi_update_fastmap()
1589 ret = erase_block(ubi, old_fm->e[0]->pnum); in ubi_update_fastmap()
1594 ubi_wl_put_fm_peb(ubi, new_fm->e[i], in ubi_update_fastmap()
1596 new_fm->e[i] = NULL; in ubi_update_fastmap()
1600 new_fm->e[0] = old_fm->e[0]; in ubi_update_fastmap()
1601 new_fm->e[0]->ec = ret; in ubi_update_fastmap()
1602 old_fm->e[0] = NULL; in ubi_update_fastmap()
1605 ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0, in ubi_update_fastmap()
1607 new_fm->e[0] = tmp_e; in ubi_update_fastmap()
1608 old_fm->e[0] = NULL; in ubi_update_fastmap()
1615 ubi_wl_put_fm_peb(ubi, new_fm->e[i], i, 0); in ubi_update_fastmap()
1616 new_fm->e[i] = NULL; in ubi_update_fastmap()
1622 new_fm->e[0] = tmp_e; in ubi_update_fastmap()