Lines Matching refs:fmsb
612 struct ubi_fm_sb *fmsb; in ubi_attach_fastmap() local
627 fmsb = (struct ubi_fm_sb *)(fm_raw); in ubi_attach_fastmap()
628 ai->max_sqnum = fmsb->sqnum; in ubi_attach_fastmap()
881 struct ubi_fm_sb *fmsb, *fmsb2; in ubi_scan_fastmap() local
893 fmsb = kmalloc(sizeof(*fmsb), GFP_KERNEL); in ubi_scan_fastmap()
894 if (!fmsb) { in ubi_scan_fastmap()
902 kfree(fmsb); in ubi_scan_fastmap()
906 ret = ubi_io_read(ubi, fmsb, fm_anchor, ubi->leb_start, sizeof(*fmsb)); in ubi_scan_fastmap()
912 if (be32_to_cpu(fmsb->magic) != UBI_FM_SB_MAGIC) { in ubi_scan_fastmap()
914 be32_to_cpu(fmsb->magic), UBI_FM_SB_MAGIC); in ubi_scan_fastmap()
919 if (fmsb->version != UBI_FM_FMT_VERSION) { in ubi_scan_fastmap()
921 fmsb->version, UBI_FM_FMT_VERSION); in ubi_scan_fastmap()
926 used_blocks = be32_to_cpu(fmsb->used_blocks); in ubi_scan_fastmap()
957 pnum = be32_to_cpu(fmsb->block_loc[i]); in ubi_scan_fastmap()
1026 kfree(fmsb); in ubi_scan_fastmap()
1027 fmsb = NULL; in ubi_scan_fastmap()
1090 kfree(fmsb); in ubi_scan_fastmap()
1107 struct ubi_fm_sb *fmsb; in ubi_write_fastmap() local
1146 fmsb = (struct ubi_fm_sb *)fm_raw; in ubi_write_fastmap()
1147 fm_pos += sizeof(*fmsb); in ubi_write_fastmap()
1154 fmsb->magic = cpu_to_be32(UBI_FM_SB_MAGIC); in ubi_write_fastmap()
1155 fmsb->version = UBI_FM_FMT_VERSION; in ubi_write_fastmap()
1156 fmsb->used_blocks = cpu_to_be32(new_fm->used_blocks); in ubi_write_fastmap()
1158 fmsb->sqnum = 0; in ubi_write_fastmap()
1308 fmsb->block_loc[i] = cpu_to_be32(new_fm->e[i]->pnum); in ubi_write_fastmap()
1310 fmsb->block_ec[i] = cpu_to_be32(new_fm->e[i]->ec); in ubi_write_fastmap()
1313 fmsb->data_crc = 0; in ubi_write_fastmap()
1314 fmsb->data_crc = cpu_to_be32(crc32(UBI_CRC32_INIT, fm_raw, in ubi_write_fastmap()