xref: /freebsd/share/man/man9/VFS_STATFS.9 (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1.\" -*- nroff -*-
2.\"
3.\" Copyright (c) 1996 Doug Rabson
4.\"
5.\" All rights reserved.
6.\"
7.\" This program is free software.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28.\"
29.Dd May 23, 2009
30.Dt VFS_STATFS 9
31.Os
32.Sh NAME
33.Nm VFS_STATFS
34.Nd return file system status
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/mount.h
38.In sys/vnode.h
39.Ft int
40.Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp"
41.Sh DESCRIPTION
42The
43.Fn VFS_STATFS
44macro returns various pieces of information about the file system,
45including recommended I/O sizes, free space, free inodes, etc.
46.Pp
47The arguments it expects are:
48.Bl -tag -width sbp
49.It Fa mp
50The file system.
51.It Fa sbp
52A
53.Vt statfs
54structure, as defined by
55.In sys/mount.h ,
56into which information is placed about the file system.
57.El
58.Pp
59The fields of
60.Vt "struct statfs"
61related to the file system are as follows:
62.Bl -tag -width ".Va f_mntfromname"
63.It Va f_type
64Type of file system.
65.It Va f_flags
66A copy of mount exported flags.
67.It Va f_bsize
68Fragment size.
69.It Va f_iosize
70Optimal transfer block size.
71.It Va f_blocks
72The total number of data blocks in the file system.
73.It Va f_bfree
74The number of free blocks in the file system.
75.It Va f_bavail
76The number of free blocks available to non-superuser processes.
77.It Va f_files
78The total number of file nodes in the file system.
79.It Va f_ffree
80The number of free nodes available to non-superuser processes.
81.It Va f_syncwrites
82The number of synchronous writes since the file system was mounted.
83.It Va f_asyncwrites
84The number of asynchronous writes since the file system was mounted.
85.It Va f_syncreads
86The number of synchronous reads since the file system was mounted.
87.It Va f_asyncreads
88The number of asynchronous reads since the file system was mounted.
89.It Va f_namemax
90The maximum file name length for this file system.
91.It Va f_owner
92The user ID of the user that mounted the file system.
93.It Va f_fsid
94Unique file system ID.
95.It Va f_fstypename
96The file system type name; a string of at most
97.Dv MFSNAMELEN
98bytes.
99.It Va f_mntfromname
100The device name the file system was mounted from; a string of at most
101.Dv MNAMELEN
102bytes.
103.It Va f_mntonname
104The name of the directory on which the file system is mounted;
105a string of at most
106.Dv MNAMELEN
107bytes.
108.El
109.Sh SEE ALSO
110.Xr VFS 9 ,
111.Xr vnode 9
112.Sh AUTHORS
113This manual page was written by
114.An Doug Rabson .
115