Lines Matching refs:fmsb

553 	struct ubi_fm_sb *fmsb;  in ubi_attach_fastmap()  local
568 fmsb = (struct ubi_fm_sb *)(fm_raw); in ubi_attach_fastmap()
569 ai->max_sqnum = fmsb->sqnum; in ubi_attach_fastmap()
853 struct ubi_fm_sb *fmsb, *fmsb2; in ubi_scan_fastmap() local
882 fmsb = kmalloc(sizeof(*fmsb), GFP_KERNEL); in ubi_scan_fastmap()
883 if (!fmsb) { in ubi_scan_fastmap()
891 kfree(fmsb); in ubi_scan_fastmap()
895 ret = ubi_io_read_data(ubi, fmsb, fm_anchor, 0, sizeof(*fmsb)); in ubi_scan_fastmap()
901 if (be32_to_cpu(fmsb->magic) != UBI_FM_SB_MAGIC) { in ubi_scan_fastmap()
903 be32_to_cpu(fmsb->magic), UBI_FM_SB_MAGIC); in ubi_scan_fastmap()
908 if (fmsb->version != UBI_FM_FMT_VERSION) { in ubi_scan_fastmap()
910 fmsb->version, UBI_FM_FMT_VERSION); in ubi_scan_fastmap()
915 used_blocks = be32_to_cpu(fmsb->used_blocks); in ubi_scan_fastmap()
948 pnum = be32_to_cpu(fmsb->block_loc[i]); in ubi_scan_fastmap()
1024 kfree(fmsb); in ubi_scan_fastmap()
1025 fmsb = NULL; in ubi_scan_fastmap()
1089 kfree(fmsb); in ubi_scan_fastmap()
1126 struct ubi_fm_sb *fmsb; in ubi_write_fastmap() local
1169 fmsb = (struct ubi_fm_sb *)fm_raw; in ubi_write_fastmap()
1170 fm_pos += sizeof(*fmsb); in ubi_write_fastmap()
1177 fmsb->magic = cpu_to_be32(UBI_FM_SB_MAGIC); in ubi_write_fastmap()
1178 fmsb->version = UBI_FM_FMT_VERSION; in ubi_write_fastmap()
1179 fmsb->used_blocks = cpu_to_be32(new_fm->used_blocks); in ubi_write_fastmap()
1181 fmsb->sqnum = 0; in ubi_write_fastmap()
1346 fmsb->block_loc[i] = cpu_to_be32(new_fm->e[i]->pnum); in ubi_write_fastmap()
1348 fmsb->block_ec[i] = cpu_to_be32(new_fm->e[i]->ec); in ubi_write_fastmap()
1351 fmsb->data_crc = 0; in ubi_write_fastmap()
1352 fmsb->data_crc = cpu_to_be32(crc32(UBI_CRC32_INIT, fm_raw, in ubi_write_fastmap()