• Home
  • Raw
  • Download

Lines Matching refs:exfat

27 void exfat_bitmap_set_range(struct exfat *exfat, char *bitmap,  in exfat_bitmap_set_range()  argument
32 if (!exfat_heap_clus(exfat, start_clus) || in exfat_bitmap_set_range()
33 !exfat_heap_clus(exfat, start_clus + count - 1)) in exfat_bitmap_set_range()
43 static int exfat_bitmap_find_bit(struct exfat *exfat, char *bmap, in exfat_bitmap_find_bit() argument
49 last_clu = le32_to_cpu(exfat->bs->bsx.clu_count) + in exfat_bitmap_find_bit()
61 int exfat_bitmap_find_zero(struct exfat *exfat, char *bmap, in exfat_bitmap_find_zero() argument
64 return exfat_bitmap_find_bit(exfat, bmap, in exfat_bitmap_find_zero()
68 int exfat_bitmap_find_one(struct exfat *exfat, char *bmap, in exfat_bitmap_find_one() argument
71 return exfat_bitmap_find_bit(exfat, bmap, in exfat_bitmap_find_one()
407 int exfat_read_volume_label(struct exfat *exfat) in exfat_read_volume_label() argument
417 err = exfat_lookup_dentry_set(exfat, exfat->root, &filter); in exfat_read_volume_label()
434 exfat->volume_label, sizeof(exfat->volume_label)) < 0) { in exfat_read_volume_label()
440 exfat_info("label: %s\n", exfat->volume_label); in exfat_read_volume_label()
446 int exfat_set_volume_label(struct exfat *exfat, char *label_input) in exfat_set_volume_label() argument
458 err = exfat_lookup_dentry_set(exfat, exfat->root, &filter); in exfat_set_volume_label()
483 loc.parent = exfat->root; in exfat_set_volume_label()
486 err = exfat_add_dentry_set(exfat, &loc, pvol, dcount, false); in exfat_set_volume_label()
695 int exfat_get_next_clus(struct exfat *exfat, clus_t clus, clus_t *next) in exfat_get_next_clus() argument
701 if (!exfat_heap_clus(exfat, clus)) in exfat_get_next_clus()
704 offset = (off_t)le32_to_cpu(exfat->bs->bsx.fat_offset) << in exfat_get_next_clus()
705 exfat->bs->bsx.sect_size_bits; in exfat_get_next_clus()
708 if (exfat_read(exfat->blk_dev->dev_fd, next, sizeof(*next), offset) in exfat_get_next_clus()
715 int exfat_get_inode_next_clus(struct exfat *exfat, struct exfat_inode *node, in exfat_get_inode_next_clus() argument
721 if (!exfat_heap_clus(exfat, clus)) in exfat_get_inode_next_clus()
727 return exfat_get_next_clus(exfat, clus, next); in exfat_get_inode_next_clus()
730 int exfat_set_fat(struct exfat *exfat, clus_t clus, clus_t next_clus) in exfat_set_fat() argument
734 offset = le32_to_cpu(exfat->bs->bsx.fat_offset) << in exfat_set_fat()
735 exfat->bs->bsx.sect_size_bits; in exfat_set_fat()
738 if (exfat_write(exfat->blk_dev->dev_fd, &next_clus, sizeof(next_clus), in exfat_set_fat()
744 off_t exfat_s2o(struct exfat *exfat, off_t sect) in exfat_s2o() argument
746 return sect << exfat->bs->bsx.sect_size_bits; in exfat_s2o()
749 off_t exfat_c2o(struct exfat *exfat, unsigned int clus) in exfat_c2o() argument
754 return exfat_s2o(exfat, le32_to_cpu(exfat->bs->bsx.clu_offset) + in exfat_c2o()
756 exfat->bs->bsx.sect_per_clus_bits)); in exfat_c2o()
759 int exfat_o2c(struct exfat *exfat, off_t device_offset, in exfat_o2c() argument
764 heap_offset = exfat_s2o(exfat, le32_to_cpu(exfat->bs->bsx.clu_offset)); in exfat_o2c()
769 exfat->clus_size) + EXFAT_FIRST_CLUSTER; in exfat_o2c()
770 if (!exfat_heap_clus(exfat, *clu)) in exfat_o2c()
772 *offset = (device_offset - heap_offset) % exfat->clus_size; in exfat_o2c()
776 bool exfat_heap_clus(struct exfat *exfat, clus_t clus) in exfat_heap_clus() argument
779 (clus - EXFAT_FIRST_CLUSTER) < exfat->clus_count; in exfat_heap_clus()
782 int exfat_root_clus_count(struct exfat *exfat) in exfat_root_clus_count() argument
784 struct exfat_inode *node = exfat->root; in exfat_root_clus_count()
788 if (!exfat_heap_clus(exfat, node->first_clus)) in exfat_root_clus_count()
793 if (exfat_bitmap_get(exfat->alloc_bitmap, clus)) in exfat_root_clus_count()
796 exfat_bitmap_set(exfat->alloc_bitmap, clus); in exfat_root_clus_count()
798 if (exfat_get_inode_next_clus(exfat, node, clus, &next)) { in exfat_root_clus_count()
803 if (next != EXFAT_EOF_CLUSTER && !exfat_heap_clus(exfat, next)) in exfat_root_clus_count()
810 node->size = clus_count * exfat->clus_size; in exfat_root_clus_count()