xref: /freebsd/usr.sbin/makefs/ffs.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1881e506bSEd Maste /*	$NetBSD: ffs.h,v 1.2 2004/12/20 20:51:42 jmc Exp $	*/
201a0f853SOlivier Houchard 
31de7b4b8SPedro F. Giffuni /*-
41de7b4b8SPedro F. Giffuni  * SPDX-License-Identifier: BSD-4-Clause
51de7b4b8SPedro F. Giffuni  *
601a0f853SOlivier Houchard  * Copyright (c) 2001-2003 Wasabi Systems, Inc.
701a0f853SOlivier Houchard  * All rights reserved.
801a0f853SOlivier Houchard  *
901a0f853SOlivier Houchard  * Written by Luke Mewburn for Wasabi Systems, Inc.
1001a0f853SOlivier Houchard  *
1101a0f853SOlivier Houchard  * Redistribution and use in source and binary forms, with or without
1201a0f853SOlivier Houchard  * modification, are permitted provided that the following conditions
1301a0f853SOlivier Houchard  * are met:
1401a0f853SOlivier Houchard  * 1. Redistributions of source code must retain the above copyright
1501a0f853SOlivier Houchard  *    notice, this list of conditions and the following disclaimer.
1601a0f853SOlivier Houchard  * 2. Redistributions in binary form must reproduce the above copyright
1701a0f853SOlivier Houchard  *    notice, this list of conditions and the following disclaimer in the
1801a0f853SOlivier Houchard  *    documentation and/or other materials provided with the distribution.
1901a0f853SOlivier Houchard  * 3. All advertising materials mentioning features or use of this software
2001a0f853SOlivier Houchard  *    must display the following acknowledgement:
2101a0f853SOlivier Houchard  *      This product includes software developed for the NetBSD Project by
2201a0f853SOlivier Houchard  *      Wasabi Systems, Inc.
2301a0f853SOlivier Houchard  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
2401a0f853SOlivier Houchard  *    or promote products derived from this software without specific prior
2501a0f853SOlivier Houchard  *    written permission.
2601a0f853SOlivier Houchard  *
2701a0f853SOlivier Houchard  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
2801a0f853SOlivier Houchard  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2901a0f853SOlivier Houchard  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3001a0f853SOlivier Houchard  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
3101a0f853SOlivier Houchard  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3201a0f853SOlivier Houchard  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3301a0f853SOlivier Houchard  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3401a0f853SOlivier Houchard  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3501a0f853SOlivier Houchard  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3601a0f853SOlivier Houchard  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3701a0f853SOlivier Houchard  * POSSIBILITY OF SUCH DAMAGE.
3801a0f853SOlivier Houchard  */
3901a0f853SOlivier Houchard 
4001a0f853SOlivier Houchard #ifndef _FFS_H
4101a0f853SOlivier Houchard #define _FFS_H
4201a0f853SOlivier Houchard 
43703d6e3eSNathan Whitehorn #include <ufs/ufs/dinode.h>
44703d6e3eSNathan Whitehorn #include <ufs/ffs/fs.h>
45*afb6a168SNathan Whitehorn #include <stdbool.h>
46703d6e3eSNathan Whitehorn 
4701a0f853SOlivier Houchard typedef struct {
48703d6e3eSNathan Whitehorn 	char	label[MAXVOLLEN];	/* volume name/label */
4901a0f853SOlivier Houchard 	int	bsize;		/* block size */
5001a0f853SOlivier Houchard 	int	fsize;		/* fragment size */
5101a0f853SOlivier Houchard 	int	cpg;		/* cylinders per group */
5201a0f853SOlivier Houchard 	int	cpgflg;		/* cpg was specified by user */
5301a0f853SOlivier Houchard 	int	density;	/* bytes per inode */
54*afb6a168SNathan Whitehorn 	bool	min_inodes;	/* allocate minimum number of inodes */
5501a0f853SOlivier Houchard 	int	ntracks;	/* number of tracks */
5601a0f853SOlivier Houchard 	int	nsectors;	/* number of sectors */
5701a0f853SOlivier Houchard 	int	rpm;		/* rpm */
5801a0f853SOlivier Houchard 	int	minfree;	/* free space threshold */
5901a0f853SOlivier Houchard 	int	optimization;	/* optimization (space or time) */
6001a0f853SOlivier Houchard 	int	maxcontig;	/* max contiguous blocks to allocate */
6101a0f853SOlivier Houchard 	int	rotdelay;	/* rotational delay between blocks */
6201a0f853SOlivier Houchard 	int	maxbpg;		/* maximum blocks per file in a cyl group */
6301a0f853SOlivier Houchard 	int	nrpos;		/* # of distinguished rotational positions */
6401a0f853SOlivier Houchard 	int	avgfilesize;	/* expected average file size */
6501a0f853SOlivier Houchard 	int	avgfpdir;	/* expected # of files per directory */
6601a0f853SOlivier Houchard 	int	version;	/* filesystem version (1 = FFS, 2 = UFS2) */
6701a0f853SOlivier Houchard 	int	maxbsize;	/* maximum extent size */
6801a0f853SOlivier Houchard 	int	maxblkspercg;	/* max # of blocks per cylinder group */
69d91e6117SEmmanuel Vadot 	int	softupdates;	/* soft updates */
7001a0f853SOlivier Houchard 		/* XXX: support `old' file systems ? */
7101a0f853SOlivier Houchard } ffs_opt_t;
7201a0f853SOlivier Houchard 
7301a0f853SOlivier Houchard #endif /* _FFS_H */
74