1.\" Copyright (c) 2001 Networks Associates Technology, Inc. 2.\" All rights reserved. 3.\" 4.\" This software was developed for the FreeBSD Project by Chris 5.\" Costello at Safeport Network Services and NAI Labs, the Security 6.\" Research Division of Network Associates, Inc. under DARPA/SPAWAR 7.\" contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS 8.\" research program. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" $FreeBSD: src/share/man/man7/ffs.7,v 1.13 2005/07/23 15:09:27 markus Exp $ 32.\" 33.Dd February 17, 2018 34.Dt FFS 5 35.Os 36.Sh NAME 37.Nm ffs , 38.Nm ufs 39.Nd Berkeley fast file system 40.Sh SYNOPSIS 41In the kernel configuration file: 42.Cd "options FFS" 43.Cd "options QUOTA" 44.Cd "options SOFTUPDATES" 45.Cd "options SUIDDIR" 46.Cd "options UFS_DIRHASH" 47.Pp 48In 49.Xr fstab 5 : 50.Bd -literal -compact 51/dev/disk0a /mnt ufs rw 1 1 52.Ed 53.Sh DESCRIPTION 54The Berkeley fast file system 55provides facilities to store file system data onto a disk device. 56.Nm 57has been optimized over the years 58for speed and reliability 59and is the default 60.Dx 61file system. 62.Ss Quotas 63.Bl -tag -width 2n 64.It Cd "options QUOTA" 65This option allows system administrators 66to set limits on disk usage 67on a per-user basis. 68Quotas can be used only on file systems 69mounted with the 70.Cm quota 71option; 72see 73.Xr quota 1 74and 75.Xr edquota 8 . 76.El 77.Ss Soft Updates 78.Bl -tag -width 2n 79.It Cd "options SOFTUPDATES" 80The soft updates feature tracks writes to the disk 81and enforces metadata update dependencies 82(e.g., updating free block maps) 83to ensure that the file system remains consistent. 84.Pp 85To enable soft updates on an 86.Em unmounted 87file system, use the following command: 88.Pp 89.D1 Nm tunefs Fl n Cm enable Ar fs 90.Pp 91.Ar fs 92can be either a mount point listed in 93.Xr fstab 5 94(e.g., 95.Pa /usr ) , 96or a disk device 97(e.g., 98.Pa /dev/da0s0a ) . 99.El 100.Ss File Ownership Inheritance 101.Bl -tag -width 2n 102.It Cd "options SUIDDIR" 103For use in file sharing environments 104on networks including 105.Tn "Microsoft Windows" 106and 107.Tn "Apple Macintosh" 108computers, 109this option allows files on file systems 110mounted with the 111.Cm suiddir 112option 113to inherit the ownership of its directory, 114i.e., 115.Dq "if it's my directory, it must be my file." 116.El 117.Ss Directory Hashing 118.Bl -tag -width 2n 119.It Cd "options UFS_DIRHASH" 120Implements a hash-based lookup scheme for directories 121in order to speed up accesses to very large directories. 122.El 123.Sh SYSCTL VARIABLES 124The following 125.Xr sysctl 8 126MIBs are defined for use with 127.Nm : 128.Bl -hang -width ".Va vfs.ufs.dirhash_docheck" 129.It Va vfs.ffs.doasyncfree 130Asynchronously write out modified i-node and indirect blocks 131upon reallocating file system blocks to be contiguous. 132(Default: 1.) 133.It Va vfs.ffs.doreallocblks 134Enable support for the rearrangement of blocks 135to be contiguous. 136(Default: 1.) 137.It Va vfs.ufs.dirhash_docheck 138Enable extra sanity tests. 139(Default: 0.) 140.It Va vfs.ufs.dirhash_mem 141Current dirhash memory usage. 142.It Va vfs.ufs.dirhash_maxmem 143Maximum allowed dirhash memory usage. 144.It Va vfs.ufs.dirhash_minsize 145Minimum directory size in bytes for which to use hashed lookup. 146.El 147.Sh SEE ALSO 148.Xr quota 1 , 149.Xr edquota 8 , 150.Xr sysctl 8 151.Rs 152.%A M. McKusick 153.%A W. Joy 154.%A S. Leffler 155.%A R. Fabry 156.%D August 1984 157.%T "A Fast File System for UNIX" 158.%J "ACM Transactions on Computer Systems" 159.%N 2 160.%V 3 161.%P 181-197 162.Re 163.Rs 164.%A M. McKusick 165.%D June 2000 166.%T "Soft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystem" 167.%J "Proceedings of the Freenix Track at the 1999 Usenix Annual Technical Conference" 168.%P 71-84 169.Re 170