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
154 * clusters. If the cluster number is beyond the end of the root in pcbmap()
180 * All other files do I/O in cluster sized blocks in pcbmap()
228 * Force the special cluster numbers in pcbmap()
229 * to be the same for all cluster sizes in pcbmap()
253 /* update last file cluster entry in the FAT cache */ in pcbmap()
259 * Find the closest entry in the FAT cache to the cluster we are looking
286 * relative cluster frcn and beyond.
370 * cluster number into the appropriate bytes in the FAT.
380 * cluster n cluster n+1
430 clusterfree(struct msdosfsmount *pmp, u_long cluster) in clusterfree() argument
435 error = fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn, MSDOSFSFREE); in clusterfree()
439 * If the cluster was successfully marked free, then update in clusterfree()
441 * bit in the "in use" cluster bit map. in clusterfree()
444 error = usemap_free(pmp, cluster); in clusterfree()
449 * Get or Set or 'Get and Set' the cluster'th entry in the FAT.
454 * cn - which cluster is of interest
456 * cluster'th entry if this is a get function
457 * newcontents - the new value to be written into the cluster'th element of
460 * This function can also be used to free a cluster by setting the FAT entry
461 * for a cluster to 0.
464 * fatentry() marks a cluster as free it does not update the inusemap in
493 * If they asked us to return a cluster number but didn't tell us in fatentry()
505 * Be sure the requested cluster is in the filesystem. in fatentry()
567 * Update a contiguous cluster chain
570 * start - first cluster of chain
572 * fillwith - what to write into FAT entry of last cluster
638 * Check the length of a free cluster chain starting at start.
694 * start - start of cluster chain.
697 * last allocated cluster.
698 * retcluster - put the first allocated cluster's number here.
725 printf("clusteralloc(): allocated cluster chain at %lu (%lu clusters)\n", in chainalloc()
739 * start - preferred start of cluster chain.
742 * last allocated cluster.
743 * retcluster - put the first allocated cluster's number here.
829 * containing the cluster chain to be freed.
830 * startcluster - number of the 1st cluster in the chain of clusters to be
834 freeclusterchain(struct msdosfsmount *pmp, u_long cluster) in freeclusterchain() argument
842 while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) { in freeclusterchain()
843 byteoffset = FATOFS(pmp, cluster); in freeclusterchain()
855 error = usemap_free(pmp, cluster); in freeclusterchain()
864 if (cluster & 1) { in freeclusterchain()
865 cluster = readcn >> 4; in freeclusterchain()
869 cluster = readcn; in freeclusterchain()
876 cluster = getushort(bp->b_data + bo); in freeclusterchain()
880 cluster = getulong(bp->b_data + bo); in freeclusterchain()
882 (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK)); in freeclusterchain()
885 cluster &= pmp->pm_fatmask; in freeclusterchain()
886 if ((cluster | ~pmp->pm_fatmask) >= CLUST_RSRVD) in freeclusterchain()
887 cluster |= pmp->pm_fatmask; in freeclusterchain()
896 * Read in FAT blocks looking for free clusters. For every free cluster
973 * Allocate a new cluster and chain it onto the end of the file.
979 * ncp - where to put cluster number of the first newly allocated cluster
980 * If this pointer is 0, do not return the cluster number.
1010 * If the "file's last cluster" cache entry is empty, and the file in extendfile()
1027 * Allocate a new cluster chain and cat onto the end of the in extendfile()
1046 * Give them the filesystem relative cluster number if they want in extendfile()
1069 * Update the "last cluster of the file" entry in the in extendfile()
1118 * manipulating the upper bit of the FAT entry for cluster 1. Note that
1122 * The fatentry() routine only works on cluster numbers that a file could
1123 * occupy, so it won't manipulate the entry for cluster 1. So we have to do
1124 * it here. The code was stolen from fatentry() and tailored for cluster 1.
1159 * pseudo-cluster 1. in markvoldirty_upgrade()