Lines Matching refs:fsbi

21     fat32_sb_info_t *fsbi = (fat32_sb_info_t *)inode->sb->private_sb_info;  in fat32_alloc_clusters()  local
24 uint64_t sec_per_fat = fsbi->sec_per_FAT; in fat32_alloc_clusters()
27 uint32_t *buf = (uint32_t *)kzalloc(fsbi->bytes_per_sec, 0); in fat32_alloc_clusters()
28 int ent_per_sec = (fsbi->bytes_per_sec >> 2); in fat32_alloc_clusters()
34 memset(buf, 0, fsbi->bytes_per_sec); in fat32_alloc_clusters()
35 …blk->bd_disk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, fsbi->FAT1_base_sector + i, 1, (… in fat32_alloc_clusters()
75 tmp_clus = fat32_read_FAT_entry(blk, fsbi, cluster); in fat32_alloc_clusters()
87 fat32_write_FAT_entry(blk, fsbi, cluster, clusters[i]); in fat32_alloc_clusters()
90 fat32_write_FAT_entry(blk, fsbi, cluster, 0x0ffffff8); in fat32_alloc_clusters()
126 uint32_t fat32_read_FAT_entry(struct block_device *blk, fat32_sb_info_t *fsbi, uint32_t cluster) in fat32_read_FAT_entry() argument
130 uint32_t fat_ent_per_sec = (fsbi->bytes_per_sec >> 2); // 该值应为2的n次幂 in fat32_read_FAT_entry()
133 memset(buf, 0, fsbi->bytes_per_sec); in fat32_read_FAT_entry()
137fsbi->FAT1_base_sector + (cluster / fat_ent_per_sec), 1, (uint64_t)&buf); in fat32_read_FAT_entry()
152 int fat32_write_FAT_entry(struct block_device *blk, fat32_sb_info_t *fsbi, uint32_t cluster, uint32… in fat32_write_FAT_entry() argument
156 uint32_t fat_ent_per_sec = (fsbi->bytes_per_sec >> 2); // 该值应为2的n次幂 in fat32_write_FAT_entry()
157 uint32_t *buf = kzalloc(fsbi->bytes_per_sec, 0); in fat32_write_FAT_entry()
160fsbi->FAT1_base_sector + (cluster / fat_ent_per_sec), 1, (uint64_t)buf); in fat32_write_FAT_entry()
165fsbi->FAT1_base_sector + (cluster / fat_ent_per_sec), 1, (uint64_t)buf); in fat32_write_FAT_entry()
167fsbi->FAT2_base_sector + (cluster / fat_ent_per_sec), 1, (uint64_t)buf); in fat32_write_FAT_entry()
191 fat32_sb_info_t *fsbi = (fat32_sb_info_t *)parent_inode->sb->private_sb_info; in fat32_find_empty_dentry() local
193 uint8_t *buf = kzalloc(fsbi->bytes_per_clus, 0); in fat32_find_empty_dentry()
207 uint64_t sector = fsbi->first_data_sector + (cluster - 2) * fsbi->sec_per_clus; in fat32_find_empty_dentry()
210 …blk->bd_disk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, sector, fsbi->sec_per_clus, (uin… in fat32_find_empty_dentry()
216 for (int i = 0; (i < fsbi->bytes_per_clus) && count_continuity < num; i += 32, ++tmp_dEntry) in fat32_find_empty_dentry()
243 cluster = fat32_read_FAT_entry(blk, fsbi, cluster); in fat32_find_empty_dentry()
257 sector = fsbi->first_data_sector + (cluster - 2) * fsbi->sec_per_clus; in fat32_find_empty_dentry()
258 void *tmp_buf = kzalloc(fsbi->bytes_per_clus, 0); in fat32_find_empty_dentry()
259 … blk->bd_disk->fops->transfer(blk->bd_disk, AHCI_CMD_WRITE_DMA_EXT, sector, fsbi->sec_per_clus, in fat32_find_empty_dentry()
438 fat32_sb_info_t *fsbi = (fat32_sb_info_t *)sb->private_sb_info; in fat32_remove_entries() local
457 fsbi->sec_per_clus, (uint64_t)sinfo->buffer); in fat32_remove_entries()
466 next_clus = fat32_read_FAT_entry(sb->blk_device, fsbi, data_cluster); in fat32_remove_entries()
469 retval = fat32_write_FAT_entry(sb->blk_device, fsbi, data_cluster, 0); in fat32_remove_entries()