Lines Matching refs:sector

24 mirror_fats(nspace *vol, uint32 sector, uint8 *buffer)
31 sector -= vol->active_fat * vol->sectors_per_fat;
40 sector + i * vol->sectors_per_fat, 0, 1, -1,
46 block_cache_put(vol->fBlockCache, sector + i * vol->sectors_per_fat);
100 uint32 sector;
135 sector = vol->reserved_sectors + vol->active_fat * vol->sectors_per_fat +
140 block1 = (uint8 *)block_cache_get(vol->fBlockCache, sector);
142 block1 = (uint8 *)block_cache_get_writable(vol->fBlockCache, sector,
147 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector %" B_PRIu32 ")\n",
148 sector));
161 ++sector);
164 ++sector, -1);
168 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector %"
169 B_PRIu32 ")\n", sector));
171 sector--;
205 mirror_fats(vol, sector - 1, block1);
216 block_cache_put(vol->fBlockCache, sector - 1);
257 mirror_fats(vol, sector, block1);
261 mirror_fats(vol, sector, block1);
284 // iterate cluster and sector if needed
286 block_cache_put(vol->fBlockCache, sector);
290 sector = vol->reserved_sectors + vol->active_fat
294 block1 = (uint8 *)block_cache_get(vol->fBlockCache, sector);
297 sector, -1);
302 block_cache_put(vol->fBlockCache, sector);
304 sector++;
306 ASSERT(sector < vol->reserved_sectors + (vol->active_fat + 1)
310 block1 = (uint8 *)block_cache_get(vol->fBlockCache, sector);
313 sector, -1);
318 DPRINTF(0, ("_fat_ioctl_: error reading fat (sector %" B_PRIu32
319 ")\n", sector));
327 block_cache_put(vol->fBlockCache, sector);
661 uint32 sector, offset, previous_entry, i, val;
676 sector = vol->reserved_sectors + vol->active_fat * vol->sectors_per_fat +
682 buffer = (uchar *)get_block(vol->fd, sector, vol->bytes_per_sector);
684 dprintf("fragment: error getting fat block %lx\n", sector);
715 mark_blocks_dirty(vol->fd, sector, 1);
716 mirror_fats(vol, sector, buffer);
718 release_block(vol->fd, sector);
721 sector--;
723 buffer = (uchar *)get_block(vol->fd, sector,
726 dprintf("fragment: error getting fat block %lx\n", sector);
739 mark_blocks_dirty(vol->fd, sector, 1);
740 mirror_fats(vol, sector, buffer);
742 release_block(vol->fd, sector);