• Home
  • Raw
  • Download

Lines Matching refs:new_fm

1102 			     struct ubi_fastmap_layout *new_fm)  in ubi_write_fastmap()  argument
1155 fmsb->used_blocks = cpu_to_be32(new_fm->used_blocks); in ubi_write_fastmap()
1299 dbg_bld("writing fastmap SB to PEB %i", new_fm->e[0]->pnum); in ubi_write_fastmap()
1300 ret = ubi_io_write_vid_hdr(ubi, new_fm->e[0]->pnum, avhdr); in ubi_write_fastmap()
1306 for (i = 0; i < new_fm->used_blocks; i++) { in ubi_write_fastmap()
1307 fmsb->block_loc[i] = cpu_to_be32(new_fm->e[i]->pnum); in ubi_write_fastmap()
1308 set_seen(ubi, new_fm->e[i]->pnum, seen_pebs); in ubi_write_fastmap()
1309 fmsb->block_ec[i] = cpu_to_be32(new_fm->e[i]->ec); in ubi_write_fastmap()
1316 for (i = 1; i < new_fm->used_blocks; i++) { in ubi_write_fastmap()
1320 new_fm->e[i]->pnum, be64_to_cpu(dvhdr->sqnum)); in ubi_write_fastmap()
1321 ret = ubi_io_write_vid_hdr(ubi, new_fm->e[i]->pnum, dvhdr); in ubi_write_fastmap()
1324 new_fm->e[i]->pnum); in ubi_write_fastmap()
1329 for (i = 0; i < new_fm->used_blocks; i++) { in ubi_write_fastmap()
1331 new_fm->e[i]->pnum, ubi->leb_start, ubi->leb_size); in ubi_write_fastmap()
1334 new_fm->e[i]->pnum); in ubi_write_fastmap()
1339 ubi_assert(new_fm); in ubi_write_fastmap()
1340 ubi->fm = new_fm; in ubi_write_fastmap()
1496 struct ubi_fastmap_layout *new_fm, *old_fm; in ubi_update_fastmap() local
1514 new_fm = kzalloc(sizeof(*new_fm), GFP_KERNEL); in ubi_update_fastmap()
1515 if (!new_fm) { in ubi_update_fastmap()
1520 new_fm->used_blocks = ubi->fm_size / ubi->leb_size; in ubi_update_fastmap()
1524 if (new_fm->used_blocks > UBI_FM_MAX_BLOCKS) { in ubi_update_fastmap()
1530 for (i = 1; i < new_fm->used_blocks; i++) { in ubi_update_fastmap()
1542 ubi_wl_put_fm_peb(ubi, new_fm->e[j], in ubi_update_fastmap()
1544 new_fm->e[j] = NULL; in ubi_update_fastmap()
1548 new_fm->e[i] = old_fm->e[i]; in ubi_update_fastmap()
1554 ubi_wl_put_fm_peb(ubi, new_fm->e[j], j, 0); in ubi_update_fastmap()
1555 new_fm->e[j] = NULL; in ubi_update_fastmap()
1562 new_fm->e[i] = tmp_e; in ubi_update_fastmap()
1573 if (old_fm && new_fm->used_blocks < old_fm->used_blocks) { in ubi_update_fastmap()
1574 for (i = new_fm->used_blocks; i < old_fm->used_blocks; i++) { in ubi_update_fastmap()
1592 for (i = 1; i < new_fm->used_blocks; i++) { in ubi_update_fastmap()
1593 ubi_wl_put_fm_peb(ubi, new_fm->e[i], in ubi_update_fastmap()
1595 new_fm->e[i] = NULL; in ubi_update_fastmap()
1599 new_fm->e[0] = old_fm->e[0]; in ubi_update_fastmap()
1600 new_fm->e[0]->ec = ret; in ubi_update_fastmap()
1606 new_fm->e[0] = tmp_e; in ubi_update_fastmap()
1613 for (i = 1; i < new_fm->used_blocks; i++) { in ubi_update_fastmap()
1614 ubi_wl_put_fm_peb(ubi, new_fm->e[i], i, 0); in ubi_update_fastmap()
1615 new_fm->e[i] = NULL; in ubi_update_fastmap()
1621 new_fm->e[0] = tmp_e; in ubi_update_fastmap()
1626 ret = ubi_write_fastmap(ubi, new_fm); in ubi_update_fastmap()
1647 return_fm_pebs(ubi, new_fm); in ubi_update_fastmap()
1651 kfree(new_fm); in ubi_update_fastmap()