Lines Matching refs:exfat
54 struct exfat *exfat; member
99 if (ei->exfat) in free_exfat2img()
100 exfat_free_exfat(ei->exfat); in free_exfat2img()
117 ei->exfat = exfat_alloc_exfat(&ei->bdev, bs); in create_exfat2img()
118 if (!ei->exfat) in create_exfat2img()
122 ei->exfat->clus_size, in create_exfat2img()
123 ei->exfat->sect_size); in create_exfat2img()
130 ei->exfat->clus_size, in create_exfat2img()
131 ei->exfat->sect_size); in create_exfat2img()
162 struct exfat *exfat = ei->exfat; in dump_range() local
170 if (exfat_o2c(ei->exfat, start, &sc, &sc_offset) < 0) in dump_range()
172 if (exfat_o2c(ei->exfat, end - 1, &ec, &ec_offset) < 0) in dump_range()
174 exfat_bitmap_set_range(ei->exfat, exfat->alloc_bitmap, in dump_range()
180 len = (size_t)MIN(end - start, exfat->clus_size); in dump_range()
182 ret = exfat_read(exfat->blk_dev->dev_fd, in dump_range()
212 struct exfat *exfat = ei->exfat; in dump_sectors() local
215 s = exfat_s2o(exfat, start_sect); in dump_sectors()
216 e = exfat_s2o(exfat, end_sect_excl); in dump_sectors()
224 struct exfat *exfat = ei->exfat; in dump_clusters() local
227 s = exfat_c2o(exfat, start_clus); in dump_clusters()
228 e = exfat_c2o(exfat, end_clus_excl); in dump_clusters()
236 struct exfat *exfat = ei->exfat; in dump_directory() local
250 max_count = DIV_ROUND_UP(inode->size, exfat->clus_size); in dump_directory()
252 possible_count = (256 * MB) >> (exfat->bs->bsx.sect_per_clus_bits + in dump_directory()
253 exfat->bs->bsx.sect_size_bits); in dump_directory()
254 possible_count = MIN(possible_count, exfat->clus_count); in dump_directory()
256 while (exfat_heap_clus(exfat, clus) && *out_clus_count < possible_count) { in dump_directory()
257 dump_size = MIN(size, exfat->clus_size); in dump_directory()
258 start_off = exfat_c2o(exfat, clus); in dump_directory()
273 if (exfat_get_inode_next_clus(exfat, inode, clus, &clus)) in dump_directory()
281 struct exfat *exfat = ei->exfat; in dump_root() local
289 root->first_clus = le32_to_cpu(exfat->bs->bsx.root_cluster); in dump_root()
291 root->size = clus_count * exfat->clus_size; in dump_root()
293 ei->exfat->root = root; in dump_root()
367 struct exfat *exfat = ei->exfat; in read_bitmap() local
381 if (!exfat_heap_clus(exfat, le32_to_cpu(dentry->bitmap_start_clu))) { in read_bitmap()
387 exfat->disk_bitmap_clus = le32_to_cpu(dentry->bitmap_start_clu); in read_bitmap()
388 exfat->disk_bitmap_size = DIV_ROUND_UP(exfat->clus_count, 8); in read_bitmap()
391 exfat->disk_bitmap_clus, in read_bitmap()
392 exfat->disk_bitmap_clus + in read_bitmap()
393 DIV_ROUND_UP(exfat->disk_bitmap_size, in read_bitmap()
394 exfat->clus_size)); in read_bitmap()
400 struct exfat *exfat = ei->exfat; in read_upcase_table() local
411 if (!exfat_heap_clus(exfat, le32_to_cpu(dentry->upcase_start_clu))) { in read_upcase_table()
420 DIV_ROUND_UP(size, exfat->clus_size)); in read_upcase_table()
426 struct exfat *exfat = ei->exfat; in read_children() local
435 ret = exfat_de_iter_init(de_iter, exfat, dir, ei->scan_bdesc); in read_children()
466 &exfat->dir_list); in read_children()
475 if (dir == exfat->root) { in read_children()
482 if (dir == exfat->root) { in read_children()
508 struct exfat *exfat = ei->exfat; in dump_filesystem() local
514 if (!exfat->root) { in dump_filesystem()
519 list_add(&exfat->root->list, &exfat->dir_list); in dump_filesystem()
521 while (!list_empty(&exfat->dir_list)) { in dump_filesystem()
522 dir = list_entry(exfat->dir_list.next, in dump_filesystem()
550 exfat_free_dir_list(exfat); in dump_filesystem()
557 struct exfat *exfat = ei->exfat; in dump_bytes_to_stdout() local
569 len = (size_t)MIN(end_excl - start, exfat->clus_size); in dump_bytes_to_stdout()
571 ret = exfat_read(exfat->blk_dev->dev_fd, in dump_bytes_to_stdout()
589 ret = write(ei->out_fd, exfat->zero_cluster, len); in dump_bytes_to_stdout()
644 start_off = exfat_c2o(ei->exfat, clu); in dump_clusters_to_stdout()
645 end_off_excl = exfat_c2o(ei->exfat, clu + cc_clu_count); in dump_clusters_to_stdout()
651 ei->stdout_offset += (off_t)cc_clu_count * ei->exfat->clus_size; in dump_clusters_to_stdout()
661 struct exfat *exfat = ei->exfat; in dump_to_stdout() local
667 end_off = exfat_s2o(exfat, le32_to_cpu(exfat->bs->bsx.clu_offset)); in dump_to_stdout()
674 last_clu = clu + exfat->clus_count; in dump_to_stdout()
679 exfat_bitmap_get(exfat->alloc_bitmap, clu)) { in dump_to_stdout()
688 start_off = exfat_c2o(exfat, start_clu); in dump_to_stdout()
689 end_off = exfat_c2o(exfat, end_clu); in dump_to_stdout()
700 if (exfat_bitmap_find_one(exfat, exfat->alloc_bitmap, in dump_to_stdout()
702 next_clu = EXFAT_FIRST_CLUSTER + exfat->clus_count; in dump_to_stdout()
708 start_off = exfat_c2o(exfat, start_clu); in dump_to_stdout()
709 end_off = exfat_c2o(exfat, end_clu); in dump_to_stdout()
724 struct exfat *exfat = ei->exfat; in dump_header() local
731 cpu_to_le32(le32_to_cpu(exfat->bs->bsx.clu_offset) * in dump_header()
732 exfat->sect_size); in dump_header()
733 ei_hdr.cluster_size = cpu_to_le32(exfat->clus_size); in dump_header()
734 ei_hdr.cluster_count = cpu_to_le32(exfat->clus_count); in dump_header()
969 err = dump_sectors(&ei, 0, le32_to_cpu(ei.exfat->bs->bsx.clu_offset)); in main()
975 last_sect = (off_t)le32_to_cpu(ei.exfat->bs->bsx.clu_offset) + in main()
976 (le32_to_cpu(ei.exfat->bs->bsx.clu_count) << in main()
977 ei.exfat->bs->bsx.sect_per_clus_bits) - 1; in main()