Lines Matching defs:cluster

77 int fc_lfcempty;		/* # of time last file cluster cache entry
83 * cluster mapped entry was. */
115 * Map the logical cluster number of a file into a physical disk sector
119 * findcn - file relative cluster whose filesystem relative cluster number
123 * cnp - address of where to place the file system relative cluster number.
129 * This function has one side effect. If the requested file relative cluster
163 * clusters. If the cluster number is beyond the end of the root
189 * All other files do I/O in cluster sized blocks
242 * Force the special cluster numbers
243 * to be the same for all cluster sizes
267 /* update last file cluster entry in the fat cache */
273 * Find the closest entry in the fat cache to the cluster we are looking
298 * relative cluster frcn and beyond.
394 * cluster number into the appropriate bytes in the FAT.
404 * cluster n cluster n+1
428 clusterfree(struct msdosfsmount *pmp, uint32_t cluster, uint32_t *oldcnp)
433 usemap_free(pmp, cluster);
434 error = fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn, MSDOSFSFREE);
436 usemap_alloc(pmp, cluster);
440 * If the cluster was successfully marked free, then update
442 * bit in the "in use" cluster bit map.
450 * Get or Set or 'Get and Set' the cluster'th entry in the fat.
455 * cn - which cluster is of interest
457 * cluster'th entry if this is a get function
458 * newcontents - the new value to be written into the cluster'th element of
461 * This function can also be used to free a cluster by setting the fat entry
462 * for a cluster to 0.
465 * fatentry() marks a cluster as free it does not update the inusemap in
492 * If they asked us to return a cluster number but didn't tell us
502 * Be sure the requested cluster is in the filesystem.
564 * Update a contiguous cluster chain
567 * start - first cluster of chain
569 * fillwith - what to write into fat entry of last cluster
636 * Check the length of a free cluster chain starting at start.
685 * start - start of cluster chain.
688 * last allocated cluster.
689 * retcluster - put the first allocated cluster's number here.
704 printf("clusteralloc(): allocated cluster chain at %d (%d clusters)\n",
718 * start - preferred start of cluster chain.
721 * last allocated cluster.
722 * retcluster - put the first allocated cluster's number here.
753 * Start at a (pseudo) random place to maximize cluster runs
808 * containing the cluster chain to be freed.
809 * startcluster - number of the 1st cluster in the chain of clusters to be
813 freeclusterchain(struct msdosfsmount *pmp, uint32_t cluster)
820 while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
821 byteoffset = FATOFS(pmp, cluster);
833 usemap_free(pmp, cluster);
837 if (cluster & 1) {
838 cluster = readcn >> 4;
842 cluster = readcn;
849 cluster = getushort(&bp->b_data[bo]);
853 cluster = getulong(&bp->b_data[bo]);
855 (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
858 cluster &= pmp->pm_fatmask;
859 if ((cluster | ~pmp->pm_fatmask) >= CLUST_RSRVD)
860 cluster |= pmp->pm_fatmask;
868 * Read in fat blocks looking for free clusters. For every free cluster
922 * Allocate a new cluster and chain it onto the end of the file.
928 * ncp - where to put cluster number of the first newly allocated cluster
929 * If this pointer is 0, do not return the cluster number.
956 * If the "file's last cluster" cache entry is empty, and the file
970 * Preserve value for the last cluster before extending the file
978 * Allocate a new cluster chain and cat onto the end of the
997 * Give them the filesystem relative cluster number if they want
1020 * Update the "last cluster of the file" entry in the denode's fat