Lines Matching full:cluster
113 * Map the logical cluster number of a file into a physical disk sector
117 * findcn - file relative cluster whose filesystem relative cluster number
121 * cnp - address of where to place the filesystem relative cluster number.
126 * This function has one side effect. If the requested file relative cluster
152 * clusters. If the cluster number is beyond the end of the root
178 * All other files do I/O in cluster sized blocks
228 * Force the special cluster numbers
229 * to be the same for all cluster sizes
253 /* update last file cluster entry in the FAT cache */
259 * Find the closest entry in the FAT cache to the cluster we are looking
284 * relative cluster frcn and beyond.
366 * cluster number into the appropriate bytes in the FAT.
376 * cluster n cluster n+1
411 clusterfree(struct msdosfsmount *pmp, u_long cluster)
416 error = fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn, MSDOSFSFREE);
420 * If the cluster was successfully marked free, then update
422 * bit in the "in use" cluster bit map.
424 usemap_free(pmp, cluster);
428 * Get or Set or 'Get and Set' the cluster'th entry in the FAT.
433 * cn - which cluster is of interest
435 * cluster'th entry if this is a get function
436 * newcontents - the new value to be written into the cluster'th element of
439 * This function can also be used to free a cluster by setting the FAT entry
440 * for a cluster to 0.
443 * fatentry() marks a cluster as free it does not update the inusemap in
472 * If they asked us to return a cluster number but didn't tell us
484 * Be sure the requested cluster is in the filesystem.
547 * Update a contiguous cluster chain
550 * start - first cluster of chain
552 * fillwith - what to write into FAT entry of last cluster
619 * Check the length of a free cluster chain starting at start.
673 * start - start of cluster chain.
676 * last allocated cluster.
677 * retcluster - put the first allocated cluster's number here.
702 printf("clusteralloc(): allocated cluster chain at %lu (%lu clusters)\n",
716 * start - preferred start of cluster chain.
719 * last allocated cluster.
720 * retcluster - put the first allocated cluster's number here.
802 * containing the cluster chain to be freed.
803 * startcluster - number of the 1st cluster in the chain of clusters to be
807 freeclusterchain(struct msdosfsmount *pmp, u_long cluster)
814 while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
815 byteoffset = FATOFS(pmp, cluster);
828 usemap_free(pmp, cluster);
832 if (cluster & 1) {
833 cluster = readcn >> 4;
837 cluster = readcn;
844 cluster = getushort(bp->b_data + bo);
848 cluster = getulong(bp->b_data + bo);
850 (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
853 cluster &= pmp->pm_fatmask;
854 if ((cluster | ~pmp->pm_fatmask) >= CLUST_RSRVD)
855 cluster |= pmp->pm_fatmask;
863 * Read in FAT blocks looking for free clusters. For every free cluster
935 * Allocate a new cluster and chain it onto the end of the file.
941 * ncp - where to put cluster number of the first newly allocated cluster
942 * If this pointer is 0, do not return the cluster number.
971 * If the "file's last cluster" cache entry is empty, and the file
988 * Allocate a new cluster chain and cat onto the end of the
1007 * Give them the filesystem relative cluster number if they want
1030 * Update the "last cluster of the file" entry in the