Lines Matching defs:cluster

74 int fc_lfcempty;		/* # of time last file cluster cache entry
80 * cluster mapped entry was. */
124 * Map the logical cluster number of a file into a physical disk sector
128 * findcn - file relative cluster whose filesystem relative cluster number
132 * cnp - address of where to place the file system relative cluster number.
136 * This function has one side effect. If the requested file relative cluster
143 /* findcn: file relative cluster to get */
145 /* cnp: returned cluster number */
170 DPRINTF(("%s(start cluster=%lu)\n", __func__, cn));
174 * clusters. If the cluster number is beyond the end of the root
206 * All other files do I/O in cluster sized blocks
239 * Also stop when cluster is not in the filesystem
300 /* update last file cluster entry in the FAT cache */
307 * Find the closest entry in the FAT cache to the cluster we are looking
332 * relative cluster frcn and beyond.
374 * The cluster indicated in FSInfo isn't free
453 * cluster number into the appropriate bytes in the FAT.
463 * cluster n cluster n+1
485 clusterfree(struct msdosfsmount *pmp, u_long cluster, u_long *oldcnp)
490 usemap_free(pmp, cluster);
491 error = fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn, MSDOSFSFREE);
493 usemap_alloc(pmp, cluster);
497 * If the cluster was successfully marked free, then update
499 * bit in the "in use" cluster bit map.
507 * Get or Set or 'Get and Set' the cluster'th entry in the FAT.
512 * cn - which cluster is of interest
514 * cluster'th entry if this is a get function
515 * newcontents - the new value to be written into the cluster'th element of
518 * This function can also be used to free a cluster by setting the FAT entry
519 * for a cluster to 0.
522 * fatentry() marks a cluster as free it does not update the inusemap in
547 * If they asked us to return a cluster number but didn't tell us
558 * Be sure the requested cluster is in the filesystem.
617 * Update a contiguous cluster chain
620 * start - first cluster of chain
622 * fillwith - what to write into FAT entry of last cluster
687 * Check the length of a free cluster chain starting at start.
728 * start - start of cluster chain.
731 * last allocated cluster.
732 * retcluster - put the first allocated cluster's number here.
746 DPRINTF(("%s(): allocated cluster chain at %lu (%lu clusters)\n",
759 * start - preferred start of cluster chain.
762 * last allocated cluster.
763 * retcluster - put the first allocated cluster's number here.
791 * Start at a (pseudo) random place to maximize cluster runs
846 * containing the cluster chain to be freed.
847 * startcluster - number of the 1st cluster in the chain of clusters to be
851 freeclusterchain(struct msdosfsmount *pmp, u_long cluster)
858 while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
859 byteoffset = FATOFS(pmp, cluster);
871 usemap_free(pmp, cluster);
876 if (cluster & 1) {
877 cluster = readcn >> 4;
881 cluster = readcn;
888 cluster = getushort((char *)bp->b_data + bo);
892 cluster = getulong((char *)bp->b_data + bo);
894 (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
897 cluster &= pmp->pm_fatmask;
905 * Read in FAT blocks looking for free clusters. For every free cluster
960 * Allocate a new cluster and chain it onto the end of the file.
966 * ncp - where to put cluster number of the first newly allocated cluster
967 * If this pointer is 0, do not return the cluster number.
993 * If the "file's last cluster" cache entry is empty, and the file
1011 * Allocate a new cluster chain and cat onto the end of the
1031 * Give them the filesystem relative cluster number if they want
1054 * Update the "last cluster of the file" entry in the