Home | History | Annotate | Download | only in msdosfs

Lines Matching refs:cluster

89 int fc_lfcempty;		/* # of time last file cluster cache entry
95 * cluster mapped entry was. */
164 * Map the logical cluster number of a file into a physical disk sector
168 * findcn - file relative cluster whose filesystem relative cluster number
172 * cnp - address of where to place the file system relative cluster number.
176 * This function has one side effect. If the requested file relative cluster
183 u_long findcn, /* file relative cluster to get */
185 u_long *cnp, /* returned cluster number */
210 DPRINTF(("%s(start cluster=%lu)\n", __func__, cn));
214 * clusters. If the cluster number is beyond the end of the root
246 * All other files do I/O in cluster sized blocks
279 * Also stop when cluster is not in the filesystem
340 /* update last file cluster entry in the FAT cache */
347 * Find the closest entry in the FAT cache to the cluster we are looking
373 * relative cluster frcn and beyond.
415 * The cluster indicated in FSInfo isn't free
494 * cluster number into the appropriate bytes in the FAT.
504 * cluster n cluster n+1
526 msdosfs_clusterfree(struct msdosfsmount *pmp, u_long cluster, u_long *oldcnp)
531 usemap_free(pmp, cluster);
532 error = msdosfs_fatentry(FAT_GET_AND_SET, pmp, cluster, &oldcn,
535 usemap_alloc(pmp, cluster);
539 * If the cluster was successfully marked free, then update
541 * bit in the "in use" cluster bit map.
549 * Get or Set or 'Get and Set' the cluster'th entry in the FAT.
554 * cn - which cluster is of interest
556 * cluster'th entry if this is a get function
557 * newcontents - the new value to be written into the cluster'th element of
560 * This function can also be used to free a cluster by setting the FAT entry
561 * for a cluster to 0.
564 * fatentry() marks a cluster as free it does not update the inusemap in
590 * If they asked us to return a cluster number but didn't tell us
601 * Be sure the requested cluster is in the filesystem.
660 * Update a contiguous cluster chain
663 * start - first cluster of chain
665 * fillwith - what to write into FAT entry of last cluster
730 * Check the length of a free cluster chain starting at start.
771 * start - start of cluster chain.
774 * last allocated cluster.
775 * retcluster - put the first allocated cluster's number here.
789 DPRINTF(("%s(): allocated cluster chain at %lu (%lu clusters)\n",
802 * start - preferred start of cluster chain.
805 * last allocated cluster.
806 * retcluster - put the first allocated cluster's number here.
835 * Start at a (pseudo) random place to maximize cluster runs
890 * containing the cluster chain to be freed.
891 * startcluster - number of the 1st cluster in the chain of clusters to be
895 msdosfs_freeclusterchain(struct msdosfsmount *pmp, u_long cluster)
903 while (cluster >= CLUST_FIRST && cluster <= pmp->pm_maxcluster) {
904 byteoffset = FATOFS(pmp, cluster);
916 usemap_free(pmp, cluster);
921 if (cluster & 1) {
922 cluster = readcn >> 4;
926 cluster = readcn;
933 cluster = getushort((char *)bp->b_data + bo);
937 cluster = getulong((char *)bp->b_data + bo);
939 (MSDOSFSFREE & FAT32_MASK) | (cluster & ~FAT32_MASK));
942 cluster &= pmp->pm_fatmask;
950 * Read in FAT blocks looking for free clusters. For every free cluster
1005 * Allocate a new cluster and chain it onto the end of the file.
1011 * ncp - where to put cluster number of the first newly allocated cluster
1012 * If this pointer is 0, do not return the cluster number.
1039 * If the "file's last cluster" cache entry is empty, and the file
1057 * Allocate a new cluster chain and cat onto the end of the
1077 * Give them the filesystem relative cluster number if they want
1100 * Update the "last cluster of the file" entry in the