Lines Matching defs:map
3 * linux/fs/adfs/map.c
13 * The ADFS map is basically a set of sectors. Each sector is called a
29 * A fragment id can be repeated multiple times in the whole map for
30 * large or fragmented files. The first map zone a fragment starts in
36 * however, the frag id specifies an offset (in map bits) from the end
51 * This is fun. We need to load up to 19 bits from the map at an
63 * return the map bit offset of the fragment frag_id in the zone dm.
66 * gcc -D__KERNEL__ -O2 -I../../include -o - -S map.c
73 unsigned char *map = dm->dm_bh->b_data;
78 frag = GET_FRAG_ID(map, 8, idmask & 0x7fff);
82 frag = GET_FRAG_ID(map, start, idmask);
84 fragend = find_next_bit_le(map, endbit, start + idlen);
109 * Scan the free space map, for this zone, calculating the total
110 * number of map bits in each free space fragment.
121 unsigned char *map = dm->dm_bh->b_data;
129 frag = GET_FRAG_ID(map, start, idmask);
141 frag = GET_FRAG_ID(map, start, idmask);
143 fragend = find_next_bit_le(map, endbit, start + idlen);
190 * calculate the amount of free blocks in the map.
224 * map & root fragment is special - it starts in the center of the
235 /* Convert sector offset to map offset */
245 /* Calculate sector offset into map block */
250 adfs_error(sb, "fragment 0x%04x at offset %d not found in map",
260 static unsigned char adfs_calczonecheck(struct super_block *sb, unsigned char *map)
267 v0 += map[i] + (v3 >> 8);
269 v1 += map[i + 1] + (v0 >> 8);
271 v2 += map[i + 2] + (v1 >> 8);
273 v3 += map[i + 3] + (v2 >> 8);
277 v1 += map[1] + (v0 >> 8);
278 v2 += map[2] + (v1 >> 8);
279 v3 += map[3] + (v2 >> 8);
290 unsigned char *map;
292 map = dm[i].dm_bh->b_data;
294 if (adfs_calczonecheck(sb, map) != map[0]) {
298 crosscheck ^= map[3];
306 * Layout the map - the first zone contains a copy of the disc record,
386 adfs_error(sb, "unable to read map");
393 adfs_error(sb, "map corrupted");