fmp               199 usr/server/fs/fatfs/fatfs.h int	 fat_next_cluster(struct fatfsmount *fmp, u_long cl, u_long *next);
fmp               200 usr/server/fs/fatfs/fatfs.h int	 fat_set_cluster(struct fatfsmount *fmp, u_long cl, u_long next);
fmp               201 usr/server/fs/fatfs/fatfs.h int	 fat_alloc_cluster(struct fatfsmount *fmp, u_long scan_start, u_long *free);
fmp               202 usr/server/fs/fatfs/fatfs.h int	 fat_free_clusters(struct fatfsmount *fmp, u_long start);
fmp               203 usr/server/fs/fatfs/fatfs.h int	 fat_seek_cluster(struct fatfsmount *fmp, u_long start, u_long offset,
fmp               205 usr/server/fs/fatfs/fatfs.h int	 fat_expand_file(struct fatfsmount *fmp, u_long cl, int size);
fmp               206 usr/server/fs/fatfs/fatfs.h int	 fat_expand_dir(struct fatfsmount *fmp, u_long cl, u_long *new_cl);
fmp               217 usr/server/fs/fatfs/fatfs.h int	 fatfs_put_node(struct fatfsmount *fmp, struct fatfs_node *node);
fmp                44 usr/server/fs/fatfs/fatfs_fat.c read_fat_entry(struct fatfsmount *fmp, u_long cl)
fmp                47 usr/server/fs/fatfs/fatfs_fat.c 	char *buf = fmp->fat_buf;
fmp                52 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT16(fmp))
fmp                64 usr/server/fs/fatfs/fatfs_fat.c 	sec += fmp->fat_start;
fmp                67 usr/server/fs/fatfs/fatfs_fat.c 	if ((error = bread(fmp->dev, sec, &bp)) != 0)
fmp                72 usr/server/fs/fatfs/fatfs_fat.c 	if (!FAT12(fmp) || border == 0)
fmp                76 usr/server/fs/fatfs/fatfs_fat.c 	if ((error = bread(fmp->dev, sec + 1, &bp)) != 0)
fmp                87 usr/server/fs/fatfs/fatfs_fat.c write_fat_entry(struct fatfsmount *fmp, u_long cl)
fmp                90 usr/server/fs/fatfs/fatfs_fat.c 	char *buf = fmp->fat_buf;
fmp                95 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT16(fmp))
fmp               103 usr/server/fs/fatfs/fatfs_fat.c 	sec += fmp->fat_start;
fmp               106 usr/server/fs/fatfs/fatfs_fat.c 	bp = getblk(fmp->dev, sec);
fmp               111 usr/server/fs/fatfs/fatfs_fat.c 	if (!FAT12(fmp) || border == 0)
fmp               115 usr/server/fs/fatfs/fatfs_fat.c 	bp = getblk(fmp->dev, sec + 1);
fmp               128 usr/server/fs/fatfs/fatfs_fat.c fat_next_cluster(struct fatfsmount *fmp, u_long cl, u_long *next)
fmp               135 usr/server/fs/fatfs/fatfs_fat.c 	error = read_fat_entry(fmp, cl);
fmp               140 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT16(fmp))
fmp               146 usr/server/fs/fatfs/fatfs_fat.c 	val = *((uint16_t *)(fmp->fat_buf + offset));
fmp               149 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT12(fmp)) {
fmp               167 usr/server/fs/fatfs/fatfs_fat.c fat_set_cluster(struct fatfsmount *fmp, u_long cl, u_long next)
fmp               170 usr/server/fs/fatfs/fatfs_fat.c 	char *buf = fmp->fat_buf;
fmp               175 usr/server/fs/fatfs/fatfs_fat.c 	error = read_fat_entry(fmp, cl);
fmp               180 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT16(fmp))
fmp               186 usr/server/fs/fatfs/fatfs_fat.c 	val = (uint16_t)(next & fmp->fat_mask);
fmp               187 usr/server/fs/fatfs/fatfs_fat.c 	if (FAT12(fmp)) {
fmp               200 usr/server/fs/fatfs/fatfs_fat.c 	error = write_fat_entry(fmp, cl);
fmp               212 usr/server/fs/fatfs/fatfs_fat.c fat_alloc_cluster(struct fatfsmount *fmp, u_long scan_start, u_long *free)
fmp               218 usr/server/fs/fatfs/fatfs_fat.c 		scan_start = fmp->free_scan;
fmp               224 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_next_cluster(fmp, cl, &next);
fmp               232 usr/server/fs/fatfs/fatfs_fat.c 		if (++cl >= fmp->last_cluster)
fmp               244 usr/server/fs/fatfs/fatfs_fat.c fat_free_clusters(struct fatfsmount *fmp, u_long start)
fmp               253 usr/server/fs/fatfs/fatfs_fat.c 	while (!IS_EOFCL(fmp, cl)) {
fmp               254 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_next_cluster(fmp, cl, &next);
fmp               257 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_set_cluster(fmp, cl, CL_FREE);
fmp               263 usr/server/fs/fatfs/fatfs_fat.c 	error = fat_set_cluster(fmp, cl, CL_FREE);
fmp               278 usr/server/fs/fatfs/fatfs_fat.c fat_seek_cluster(struct fatfsmount *fmp, u_long start, u_long offset,
fmp               284 usr/server/fs/fatfs/fatfs_fat.c 	if (start > fmp->last_cluster)
fmp               288 usr/server/fs/fatfs/fatfs_fat.c 	target = offset / fmp->cluster_size;
fmp               290 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_next_cluster(fmp, c, &c);
fmp               293 usr/server/fs/fatfs/fatfs_fat.c 		if (IS_EOFCL(fmp, c))
fmp               308 usr/server/fs/fatfs/fatfs_fat.c fat_expand_file(struct fatfsmount *fmp, u_long cl, int size)
fmp               314 usr/server/fs/fatfs/fatfs_fat.c 	cl_len = size / fmp->cluster_size + 1;
fmp               317 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_next_cluster(fmp, cl, &next);
fmp               320 usr/server/fs/fatfs/fatfs_fat.c 		if (alloc || next >= fmp->fat_eof) {
fmp               321 usr/server/fs/fatfs/fatfs_fat.c 			error = fat_alloc_cluster(fmp, cl, &next);
fmp               327 usr/server/fs/fatfs/fatfs_fat.c 			error = fat_set_cluster(fmp, cl, next);
fmp               334 usr/server/fs/fatfs/fatfs_fat.c 		fat_set_cluster(fmp, cl, fmp->fat_eof);	/* add eof */
fmp               349 usr/server/fs/fatfs/fatfs_fat.c fat_expand_dir(struct fatfsmount *fmp, u_long cl, u_long *new_cl)
fmp               355 usr/server/fs/fatfs/fatfs_fat.c 	while (!IS_EOFCL(fmp, cl)) {
fmp               356 usr/server/fs/fatfs/fatfs_fat.c 		error = fat_next_cluster(fmp, cl, &next);
fmp               362 usr/server/fs/fatfs/fatfs_fat.c 	error = fat_alloc_cluster(fmp, cl, &next);
fmp               366 usr/server/fs/fatfs/fatfs_fat.c 	error = fat_set_cluster(fmp, cl, next);
fmp               370 usr/server/fs/fatfs/fatfs_fat.c 	error = fat_set_cluster(fmp, next, fmp->fat_eof);
fmp                45 usr/server/fs/fatfs/fatfs_node.c fat_read_dirent(struct fatfsmount *fmp, u_long sec)
fmp                50 usr/server/fs/fatfs/fatfs_node.c 	if ((error = bread(fmp->dev, sec, &bp)) != 0)
fmp                52 usr/server/fs/fatfs/fatfs_node.c 	memcpy(fmp->dir_buf, bp->b_data, SEC_SIZE);
fmp                61 usr/server/fs/fatfs/fatfs_node.c fat_write_dirent(struct fatfsmount *fmp, u_long sec)
fmp                65 usr/server/fs/fatfs/fatfs_node.c 	bp = getblk(fmp->dev, sec);
fmp                66 usr/server/fs/fatfs/fatfs_node.c 	memcpy(bp->b_data, fmp->dir_buf, SEC_SIZE);
fmp                80 usr/server/fs/fatfs/fatfs_node.c fat_lookup_dirent(struct fatfsmount *fmp, u_long sec, char *name,
fmp                86 usr/server/fs/fatfs/fatfs_node.c 	error = fat_read_dirent(fmp, sec);
fmp                90 usr/server/fs/fatfs/fatfs_node.c 	de = (struct fat_dirent *)fmp->dir_buf;
fmp               123 usr/server/fs/fatfs/fatfs_node.c 	struct fatfsmount *fmp;
fmp               136 usr/server/fs/fatfs/fatfs_node.c 	fmp = (struct fatfsmount *)dvp->v_mount->m_data;
fmp               140 usr/server/fs/fatfs/fatfs_node.c 		for (sec = fmp->root_start; sec < fmp->data_start; sec++) {
fmp               141 usr/server/fs/fatfs/fatfs_node.c 			error = fat_lookup_dirent(fmp, sec, fat_name, np);
fmp               147 usr/server/fs/fatfs/fatfs_node.c 		while (!IS_EOFCL(fmp, cl)) {
fmp               148 usr/server/fs/fatfs/fatfs_node.c 			sec = cl_to_sec(fmp, cl);
fmp               149 usr/server/fs/fatfs/fatfs_node.c 			for (i = 0; i < fmp->sec_per_cl; i++) {
fmp               150 usr/server/fs/fatfs/fatfs_node.c 				error = fat_lookup_dirent(fmp, sec, fat_name,
fmp               156 usr/server/fs/fatfs/fatfs_node.c 			error = fat_next_cluster(fmp, cl, &cl);
fmp               175 usr/server/fs/fatfs/fatfs_node.c fat_get_dirent(struct fatfsmount *fmp, u_long sec, int target, int *index,
fmp               181 usr/server/fs/fatfs/fatfs_node.c 	error = fat_read_dirent(fmp, sec);
fmp               185 usr/server/fs/fatfs/fatfs_node.c 	de = (struct fat_dirent *)fmp->dir_buf;
fmp               216 usr/server/fs/fatfs/fatfs_node.c 	struct fatfsmount *fmp;
fmp               220 usr/server/fs/fatfs/fatfs_node.c 	fmp = (struct fatfsmount *)dvp->v_mount->m_data;
fmp               228 usr/server/fs/fatfs/fatfs_node.c 		for (sec = fmp->root_start; sec < fmp->data_start; sec++) {
fmp               229 usr/server/fs/fatfs/fatfs_node.c 			error = fat_get_dirent(fmp, sec, index, &cur_index, np);
fmp               235 usr/server/fs/fatfs/fatfs_node.c 		while (!IS_EOFCL(fmp, cl)) {
fmp               236 usr/server/fs/fatfs/fatfs_node.c 			sec = cl_to_sec(fmp, cl);
fmp               237 usr/server/fs/fatfs/fatfs_node.c 			for (i = 0; i < fmp->sec_per_cl; i++) {
fmp               238 usr/server/fs/fatfs/fatfs_node.c 				error = fat_get_dirent(fmp, sec, index,
fmp               244 usr/server/fs/fatfs/fatfs_node.c 			error = fat_next_cluster(fmp, cl, &cl);
fmp               260 usr/server/fs/fatfs/fatfs_node.c fat_add_dirent(struct fatfsmount *fmp, u_long sec, struct fatfs_node *np)
fmp               265 usr/server/fs/fatfs/fatfs_node.c 	error = fat_read_dirent(fmp, sec);
fmp               269 usr/server/fs/fatfs/fatfs_node.c 	de = (struct fat_dirent *)fmp->dir_buf;
fmp               281 usr/server/fs/fatfs/fatfs_node.c 	error = fat_write_dirent(fmp, sec);
fmp               294 usr/server/fs/fatfs/fatfs_node.c 	struct fatfsmount *fmp;
fmp               299 usr/server/fs/fatfs/fatfs_node.c 	fmp = (struct fatfsmount *)dvp->v_mount->m_data;
fmp               306 usr/server/fs/fatfs/fatfs_node.c 		for (sec = fmp->root_start; sec < fmp->data_start; sec++) {
fmp               307 usr/server/fs/fatfs/fatfs_node.c 			error = fat_add_dirent(fmp, sec, np);
fmp               313 usr/server/fs/fatfs/fatfs_node.c 		while (!IS_EOFCL(fmp, cl)) {
fmp               314 usr/server/fs/fatfs/fatfs_node.c 			sec = cl_to_sec(fmp, cl);
fmp               315 usr/server/fs/fatfs/fatfs_node.c 			for (i = 0; i < fmp->sec_per_cl; i++) {
fmp               316 usr/server/fs/fatfs/fatfs_node.c 				error = fat_add_dirent(fmp, sec, np);
fmp               321 usr/server/fs/fatfs/fatfs_node.c 			error = fat_next_cluster(fmp, cl, &next);
fmp               328 usr/server/fs/fatfs/fatfs_node.c 		error = fat_expand_dir(fmp, cl, &next);
fmp               333 usr/server/fs/fatfs/fatfs_node.c 		memset(fmp->dir_buf, 0, SEC_SIZE);
fmp               334 usr/server/fs/fatfs/fatfs_node.c 		sec = cl_to_sec(fmp, next);
fmp               335 usr/server/fs/fatfs/fatfs_node.c 		for (i = 0; i < fmp->sec_per_cl; i++) {
fmp               336 usr/server/fs/fatfs/fatfs_node.c 			error = fat_write_dirent(fmp, sec);
fmp               342 usr/server/fs/fatfs/fatfs_node.c 		sec = cl_to_sec(fmp, next);
fmp               343 usr/server/fs/fatfs/fatfs_node.c 		error = fat_add_dirent(fmp, sec, np);
fmp               355 usr/server/fs/fatfs/fatfs_node.c fatfs_put_node(struct fatfsmount *fmp, struct fatfs_node *np)
fmp               359 usr/server/fs/fatfs/fatfs_node.c 	error = fat_read_dirent(fmp, np->sector);
fmp               363 usr/server/fs/fatfs/fatfs_node.c 	memcpy(fmp->dir_buf + np->offset, &np->dirent,
fmp               366 usr/server/fs/fatfs/fatfs_node.c 	error = fat_write_dirent(fmp, np->sector);
fmp                70 usr/server/fs/fatfs/fatfs_vfsops.c fat_read_bpb(struct fatfsmount *fmp)
fmp                82 usr/server/fs/fatfs/fatfs_vfsops.c 	error = device_read(fmp->dev, bpb, &size, 0);
fmp                94 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->fat_start = bpb->hidden_sectors + bpb->reserved_sectors;
fmp                95 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->root_start = fmp->fat_start +
fmp                97 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->data_start =
fmp                98 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->root_start + (bpb->root_entries / DIR_PER_SEC);
fmp                99 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->sec_per_cl = bpb->sectors_per_cluster;
fmp               100 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->cluster_size = bpb->sectors_per_cluster * SEC_SIZE;
fmp               101 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->last_cluster = (bpb->total_sectors - fmp->data_start) /
fmp               103 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->free_scan = CL_FIRST;
fmp               106 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_type = 12;
fmp               107 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_mask = FAT12_MASK;
fmp               108 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_eof = CL_EOF & FAT12_MASK;
fmp               110 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_type = 16;
fmp               111 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_mask = FAT16_MASK;
fmp               112 usr/server/fs/fatfs/fatfs_vfsops.c 		fmp->fat_eof = CL_EOF & FAT16_MASK;
fmp               126 usr/server/fs/fatfs/fatfs_vfsops.c 	DPRINTF(("cluster size:%u sectors\n", (int)fmp->sec_per_cl));
fmp               127 usr/server/fs/fatfs/fatfs_vfsops.c 	DPRINTF(("fat_type    :FAT%u\n", (int)fmp->fat_type));
fmp               128 usr/server/fs/fatfs/fatfs_vfsops.c 	DPRINTF(("fat_eof     :0x%x\n\n", (int)fmp->fat_eof));
fmp               138 usr/server/fs/fatfs/fatfs_vfsops.c 	struct fatfsmount *fmp;
fmp               144 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp = malloc(sizeof(struct fatfsmount));
fmp               145 usr/server/fs/fatfs/fatfs_vfsops.c 	if (fmp == NULL)
fmp               148 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->dev = mp->m_dev;
fmp               149 usr/server/fs/fatfs/fatfs_vfsops.c 	if (fat_read_bpb(fmp) != 0)
fmp               153 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->io_buf = malloc(fmp->sec_per_cl * SEC_SIZE);
fmp               154 usr/server/fs/fatfs/fatfs_vfsops.c 	if (fmp->io_buf == NULL)
fmp               157 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->fat_buf = malloc(SEC_SIZE * 2);
fmp               158 usr/server/fs/fatfs/fatfs_vfsops.c 	if (fmp->fat_buf == NULL)
fmp               161 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp->dir_buf = malloc(SEC_SIZE);
fmp               162 usr/server/fs/fatfs/fatfs_vfsops.c 	if (fmp->dir_buf == NULL)
fmp               165 usr/server/fs/fatfs/fatfs_vfsops.c 	mutex_init(&fmp->lock);
fmp               166 usr/server/fs/fatfs/fatfs_vfsops.c 	mp->m_data = fmp;
fmp               171 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp->fat_buf);
fmp               173 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp->io_buf);
fmp               175 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp);
fmp               185 usr/server/fs/fatfs/fatfs_vfsops.c 	struct fatfsmount *fmp;
fmp               187 usr/server/fs/fatfs/fatfs_vfsops.c 	fmp = mp->m_data;
fmp               188 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp->dir_buf);
fmp               189 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp->fat_buf);
fmp               190 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp->io_buf);
fmp               191 usr/server/fs/fatfs/fatfs_vfsops.c 	mutex_destroy(&fmp->lock);
fmp               192 usr/server/fs/fatfs/fatfs_vfsops.c 	free(fmp);
fmp               101 usr/server/fs/fatfs/fatfs_vnops.c fat_read_cluster(struct fatfsmount *fmp, u_long cluster)
fmp               106 usr/server/fs/fatfs/fatfs_vnops.c 	sec = cl_to_sec(fmp, cluster);
fmp               107 usr/server/fs/fatfs/fatfs_vnops.c 	size = fmp->sec_per_cl * SEC_SIZE;
fmp               108 usr/server/fs/fatfs/fatfs_vnops.c 	return device_read(fmp->dev, fmp->io_buf, &size, sec);
fmp               115 usr/server/fs/fatfs/fatfs_vnops.c fat_write_cluster(struct fatfsmount *fmp, u_long cluster)
fmp               120 usr/server/fs/fatfs/fatfs_vnops.c 	sec = cl_to_sec(fmp, cluster);
fmp               121 usr/server/fs/fatfs/fatfs_vnops.c 	size = fmp->sec_per_cl * SEC_SIZE;
fmp               122 usr/server/fs/fatfs/fatfs_vnops.c 	return device_write(fmp->dev, fmp->io_buf, &size, sec);
fmp               132 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               140 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = vp->v_mount->m_data;
fmp               141 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               149 usr/server/fs/fatfs/fatfs_vnops.c 		mutex_unlock(&fmp->lock);
fmp               160 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               167 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               174 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = vp->v_mount->m_data;
fmp               186 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               193 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_seek_cluster(fmp, vp->v_blkno, file_pos, &cl);
fmp               199 usr/server/fs/fatfs/fatfs_vnops.c 	buf_pos = file_pos % fmp->cluster_size;
fmp               201 usr/server/fs/fatfs/fatfs_vnops.c 		if (fat_read_cluster(fmp, cl)) {
fmp               206 usr/server/fs/fatfs/fatfs_vnops.c 		nr_copy = fmp->cluster_size;
fmp               209 usr/server/fs/fatfs/fatfs_vnops.c 		if (buf_pos + size < fmp->cluster_size)
fmp               211 usr/server/fs/fatfs/fatfs_vnops.c 		memcpy(buf, fmp->io_buf + buf_pos, nr_copy);
fmp               219 usr/server/fs/fatfs/fatfs_vnops.c 		error = fat_next_cluster(fmp, cl, &cl);
fmp               225 usr/server/fs/fatfs/fatfs_vnops.c 	} while (!IS_EOFCL(fmp, cl));
fmp               231 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               238 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               248 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = vp->v_mount->m_data;
fmp               255 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               263 usr/server/fs/fatfs/fatfs_vnops.c 		error = fat_expand_file(fmp, vp->v_blkno, end_pos);
fmp               273 usr/server/fs/fatfs/fatfs_vnops.c 		error = fatfs_put_node(fmp, np);
fmp               280 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_seek_cluster(fmp, vp->v_blkno, file_pos, &cl);
fmp               284 usr/server/fs/fatfs/fatfs_vnops.c 	buf_pos = file_pos % fmp->cluster_size;
fmp               285 usr/server/fs/fatfs/fatfs_vnops.c 	cl_size = size / fmp->cluster_size + 1;
fmp               291 usr/server/fs/fatfs/fatfs_vnops.c 			if (fat_read_cluster(fmp, cl)) {
fmp               296 usr/server/fs/fatfs/fatfs_vnops.c 		nr_copy = fmp->cluster_size;
fmp               299 usr/server/fs/fatfs/fatfs_vnops.c 		if (buf_pos + size < fmp->cluster_size)
fmp               301 usr/server/fs/fatfs/fatfs_vnops.c 		memcpy(fmp->io_buf + buf_pos, buf, nr_copy);
fmp               303 usr/server/fs/fatfs/fatfs_vnops.c 		if (fat_write_cluster(fmp, cl)) {
fmp               313 usr/server/fs/fatfs/fatfs_vnops.c 		error = fat_next_cluster(fmp, cl, &cl);
fmp               320 usr/server/fs/fatfs/fatfs_vnops.c 	} while (!IS_EOFCL(fmp, cl));
fmp               334 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               341 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               346 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = vp->v_mount->m_data;
fmp               347 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               368 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               378 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               392 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = dvp->v_mount->m_data;
fmp               393 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               396 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_alloc_cluster(fmp, 0, &cl);
fmp               410 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_set_cluster(fmp, cl, fmp->fat_eof);
fmp               412 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               419 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               427 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = dvp->v_mount->m_data;
fmp               428 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               444 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_free_clusters(fmp, de->cluster);
fmp               450 usr/server/fs/fatfs/fatfs_vnops.c 	error = fatfs_put_node(fmp, &np);
fmp               452 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               460 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               465 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = dvp1->v_mount->m_data;
fmp               466 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               485 usr/server/fs/fatfs/fatfs_vnops.c 			error = fatfs_put_node(fmp, &np1);
fmp               512 usr/server/fs/fatfs/fatfs_vnops.c 			error = fatfs_put_node(fmp, &np1);
fmp               522 usr/server/fs/fatfs/fatfs_vnops.c 			if (fat_read_cluster(fmp, de1->cluster)) {
fmp               527 usr/server/fs/fatfs/fatfs_vnops.c 			de2 = (struct fat_dirent *)fmp->io_buf;
fmp               536 usr/server/fs/fatfs/fatfs_vnops.c 			if (fat_write_cluster(fmp, de1->cluster)) {
fmp               548 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               555 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               567 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = dvp->v_mount->m_data;
fmp               568 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               571 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_alloc_cluster(fmp, 0, &cl);
fmp               587 usr/server/fs/fatfs/fatfs_vnops.c 	memset(fmp->io_buf, 0, fmp->cluster_size);
fmp               589 usr/server/fs/fatfs/fatfs_vnops.c 	de = (struct fat_dirent *)fmp->io_buf;
fmp               602 usr/server/fs/fatfs/fatfs_vnops.c 	if (fat_write_cluster(fmp, cl)) {
fmp               607 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_set_cluster(fmp, cl, fmp->fat_eof);
fmp               609 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               619 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               627 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = dvp->v_mount->m_data;
fmp               628 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               641 usr/server/fs/fatfs/fatfs_vnops.c 	error = fat_free_clusters(fmp, de->cluster);
fmp               648 usr/server/fs/fatfs/fatfs_vnops.c 	error = fatfs_put_node(fmp, &np);
fmp               650 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);
fmp               680 usr/server/fs/fatfs/fatfs_vnops.c 	struct fatfsmount *fmp;
fmp               685 usr/server/fs/fatfs/fatfs_vnops.c 	fmp = vp->v_mount->m_data;
fmp               686 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_lock(&fmp->lock);
fmp               693 usr/server/fs/fatfs/fatfs_vnops.c 		error = fat_free_clusters(fmp, de->cluster);
fmp               697 usr/server/fs/fatfs/fatfs_vnops.c 		error = fat_expand_file(fmp, vp->v_blkno, length);
fmp               706 usr/server/fs/fatfs/fatfs_vnops.c 	error = fatfs_put_node(fmp, np);
fmp               711 usr/server/fs/fatfs/fatfs_vnops.c 	mutex_unlock(&fmp->lock);