Lines Matching full:cluster
7 * Mar 1999. AV. Changed cache, so that it uses the starting cluster instead
21 int fcluster; /* cluster number in the file. */
22 int dcluster; /* cluster number on disk. */
123 /* Find the same part as "new" in cluster-chain. */ in fat_cache_merge()
225 int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) in fat_get_cluster() argument
240 "%s: invalid start cluster (i_pos %lld, start %08x)", in fat_get_cluster()
244 if (cluster == 0) in fat_get_cluster()
247 if (fat_cache_lookup(inode, cluster, &cid, fclus, dclus) < 0) { in fat_get_cluster()
256 while (*fclus < cluster) { in fat_get_cluster()
257 /* prevent the infinite loop of cluster chain */ in fat_get_cluster()
260 "%s: detected the cluster chain loop (i_pos %lld)", in fat_get_cluster()
271 "%s: invalid cluster chain (i_pos %lld)", in fat_get_cluster()
291 static int fat_bmap_cluster(struct inode *inode, int cluster) in fat_bmap_cluster() argument
299 ret = fat_get_cluster(inode, cluster, &fclus, &dclus); in fat_bmap_cluster()
316 int cluster, offset; in fat_get_mapped_cluster() local
318 cluster = sector >> (sbi->cluster_bits - sb->s_blocksize_bits); in fat_get_mapped_cluster()
320 cluster = fat_bmap_cluster(inode, cluster); in fat_get_mapped_cluster()
321 if (cluster < 0) in fat_get_mapped_cluster()
322 return cluster; in fat_get_mapped_cluster()
323 else if (cluster) { in fat_get_mapped_cluster()
324 *bmap = fat_clus_to_blknr(sbi, cluster) + offset; in fat_get_mapped_cluster()