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