Lines Matching refs:cid
81 struct fat_cache_id *cid, in fat_cache_lookup() argument
105 cid->id = MSDOS_I(inode)->cache_valid_id; in fat_cache_lookup()
106 cid->nr_contig = hit->nr_contig; in fat_cache_lookup()
107 cid->fcluster = hit->fcluster; in fat_cache_lookup()
108 cid->dcluster = hit->dcluster; in fat_cache_lookup()
109 *cached_fclus = cid->fcluster + offset; in fat_cache_lookup()
110 *cached_dclus = cid->dcluster + offset; in fat_cache_lookup()
211 static inline int cache_contiguous(struct fat_cache_id *cid, int dclus) in cache_contiguous() argument
213 cid->nr_contig++; in cache_contiguous()
214 return ((cid->dcluster + cid->nr_contig) == dclus); in cache_contiguous()
217 static inline void cache_init(struct fat_cache_id *cid, int fclus, int dclus) in cache_init() argument
219 cid->id = FAT_CACHE_VALID; in cache_init()
220 cid->fcluster = fclus; in cache_init()
221 cid->dcluster = dclus; in cache_init()
222 cid->nr_contig = 0; in cache_init()
231 struct fat_cache_id cid; in fat_get_cluster() local
247 if (fat_cache_lookup(inode, cluster, &cid, fclus, dclus) < 0) { in fat_get_cluster()
252 cache_init(&cid, -1, -1); in fat_get_cluster()
276 fat_cache_add(inode, &cid); in fat_get_cluster()
281 if (!cache_contiguous(&cid, *dclus)) in fat_get_cluster()
282 cache_init(&cid, *fclus, *dclus); in fat_get_cluster()
285 fat_cache_add(inode, &cid); in fat_get_cluster()