1fab63cc4SDoug Rabson.\" -*- nroff -*- 2fab63cc4SDoug Rabson.\" 3fab63cc4SDoug Rabson.\" Copyright (c) 1996 Doug Rabson 4fab63cc4SDoug Rabson.\" 5fab63cc4SDoug Rabson.\" All rights reserved. 6fab63cc4SDoug Rabson.\" 7fab63cc4SDoug Rabson.\" This program is free software. 8fab63cc4SDoug Rabson.\" 9fab63cc4SDoug Rabson.\" Redistribution and use in source and binary forms, with or without 10fab63cc4SDoug Rabson.\" modification, are permitted provided that the following conditions 11fab63cc4SDoug Rabson.\" are met: 12fab63cc4SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright 13fab63cc4SDoug Rabson.\" notice, this list of conditions and the following disclaimer. 14fab63cc4SDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright 15fab63cc4SDoug Rabson.\" notice, this list of conditions and the following disclaimer in the 16fab63cc4SDoug Rabson.\" documentation and/or other materials provided with the distribution. 17fab63cc4SDoug Rabson.\" 18fab63cc4SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 19fab63cc4SDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20fab63cc4SDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21fab63cc4SDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22fab63cc4SDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23fab63cc4SDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24fab63cc4SDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25fab63cc4SDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26fab63cc4SDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27fab63cc4SDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28fab63cc4SDoug Rabson.\" 297f3dea24SPeter Wemm.\" $FreeBSD$ 30fab63cc4SDoug Rabson.\" 313d5ea0fbSGiorgos Keramidas.Dd January 7, 2005 32fab63cc4SDoug Rabson.Os 33fab63cc4SDoug Rabson.Dt VFS_STATFS 9 34fab63cc4SDoug Rabson.Sh NAME 35fab63cc4SDoug Rabson.Nm VFS_STATFS 36fab63cc4SDoug Rabson.Nd return file system status 37fab63cc4SDoug Rabson.Sh SYNOPSIS 3832eef9aeSRuslan Ermilov.In sys/param.h 3932eef9aeSRuslan Ermilov.In sys/mount.h 4032eef9aeSRuslan Ermilov.In sys/vnode.h 41fab63cc4SDoug Rabson.Ft int 42f16b3c0dSChad David.Fn VFS_STATFS "struct mount *mp" "struct statfs *sbp" "struct thread *td" 43fab63cc4SDoug Rabson.Sh DESCRIPTION 443d5ea0fbSGiorgos KeramidasThe 453d5ea0fbSGiorgos Keramidas.Fn VFS_STATFS 463d5ea0fbSGiorgos Keramidasmacro returns various pieces of information about the file system, 47fab63cc4SDoug Rabsonincluding recommended I/O sizes, free space, free inodes, etc. 48fab63cc4SDoug Rabson.Pp 493d5ea0fbSGiorgos KeramidasThe arguments it expects are: 50fab63cc4SDoug Rabson.Bl -tag -width sbp 510640e9e0SHiten Pandya.It Fa mp 52fab63cc4SDoug RabsonThe file system. 530640e9e0SHiten Pandya.It Fa sbp 543d5ea0fbSGiorgos KeramidasA 556b13dcc0SRuslan Ermilov.Vt statfs 563d5ea0fbSGiorgos Keramidasstructure, as defined by 573d5ea0fbSGiorgos Keramidas.In sys/mount.h , 583d5ea0fbSGiorgos Keramidasinto which information is placed about the file system. 590640e9e0SHiten Pandya.It Fa td 60f16b3c0dSChad DavidThe thread which is querying the file system. 61fab63cc4SDoug Rabson.El 623d5ea0fbSGiorgos Keramidas.Pp 633d5ea0fbSGiorgos KeramidasThe fields of 646b13dcc0SRuslan Ermilov.Vt "struct statfs" 653d5ea0fbSGiorgos Keramidasrelated to the file system are as follows: 666b13dcc0SRuslan Ermilov.Bl -tag -width ".Va f_mntfromname" 673d5ea0fbSGiorgos Keramidas.It Va f_type 683d5ea0fbSGiorgos KeramidasType of file system. 693d5ea0fbSGiorgos Keramidas.It Va f_flags 703d5ea0fbSGiorgos KeramidasA copy of mount exported flags. 713d5ea0fbSGiorgos Keramidas.It Va f_bsize 723d5ea0fbSGiorgos KeramidasFragment size. 733d5ea0fbSGiorgos Keramidas.It Va f_iosize 743d5ea0fbSGiorgos KeramidasOptimal transfer block size. 753d5ea0fbSGiorgos Keramidas.It Va f_blocks 763d5ea0fbSGiorgos KeramidasThe total number of data blocks in the file system. 773d5ea0fbSGiorgos Keramidas.It Va f_bfree 783d5ea0fbSGiorgos KeramidasThe number of free blocks in the file system. 793d5ea0fbSGiorgos Keramidas.It Va f_bavail 803d5ea0fbSGiorgos KeramidasThe number of free blocks available to non-superuser processes. 813d5ea0fbSGiorgos Keramidas.It Va f_files 823d5ea0fbSGiorgos KeramidasThe total number of file nodes in the file system. 833d5ea0fbSGiorgos Keramidas.It Va f_ffree 843d5ea0fbSGiorgos KeramidasThe number of free nodes available to non-superuser processes. 853d5ea0fbSGiorgos Keramidas.It Va f_syncwrites 863d5ea0fbSGiorgos KeramidasThe number of synchronous writes since the file system was mounted. 873d5ea0fbSGiorgos Keramidas.It Va f_asyncwrites 883d5ea0fbSGiorgos KeramidasThe number of asynchronous writes since the file system was mounted. 893d5ea0fbSGiorgos Keramidas.It Va f_syncreads 903d5ea0fbSGiorgos KeramidasThe number of synchronous reads since the file system was mounted. 913d5ea0fbSGiorgos Keramidas.It Va f_asyncreads 923d5ea0fbSGiorgos KeramidasThe number of asynchronous reads since the file system was mounted. 933d5ea0fbSGiorgos Keramidas.It Va f_namemax 943d5ea0fbSGiorgos KeramidasThe maximum file name length for this file system. 953d5ea0fbSGiorgos Keramidas.It Va f_owner 963d5ea0fbSGiorgos KeramidasThe user ID of the user that mounted the file system. 973d5ea0fbSGiorgos Keramidas.It Va f_fsid 983d5ea0fbSGiorgos KeramidasUnique file system ID. 993d5ea0fbSGiorgos Keramidas.It Va f_fstypename 1003d5ea0fbSGiorgos KeramidasThe file system type name; a string of at most 1013d5ea0fbSGiorgos Keramidas.Dv MFSNAMELEN 1023d5ea0fbSGiorgos Keramidasbytes. 1033d5ea0fbSGiorgos Keramidas.It Va f_mntfromname 1043d5ea0fbSGiorgos KeramidasThe device name the file system was mounted from; a string of at most 1053d5ea0fbSGiorgos Keramidas.Dv MNAMELEN 1063d5ea0fbSGiorgos Keramidasbytes. 1073d5ea0fbSGiorgos Keramidas.It Va f_mntonname 1083d5ea0fbSGiorgos KeramidasThe name of the directory on which the file system is mounted; 1093d5ea0fbSGiorgos Keramidasa string of at most 1103d5ea0fbSGiorgos Keramidas.Dv MNAMELEN 1113d5ea0fbSGiorgos Keramidasbytes. 1123d5ea0fbSGiorgos Keramidas.El 113fab63cc4SDoug Rabson.Sh SEE ALSO 114bceb8aedSWolfram Schneider.Xr VFS 9 , 115bceb8aedSWolfram Schneider.Xr vnode 9 116fab63cc4SDoug Rabson.Sh AUTHORS 11709356c84SHiten PandyaThis manual page was written by 118aaf1f16eSPhilippe Charnier.An Doug Rabson . 119