The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/statvfs.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: statvfs.h,v 1.5 2004/10/06 04:30:04 lukem Exp $         */
    2 
    3 /*-
    4  * Copyright (c) 2004 The NetBSD Foundation, Inc.
    5  * All rights reserved.
    6  *
    7  * This code is derived from software contributed to The NetBSD Foundation
    8  * by Christos Zoulas.
    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  * 3. All advertising materials mentioning features or use of this software
   19  *    must display the following acknowledgement:
   20  *        This product includes software developed by the NetBSD
   21  *        Foundation, Inc. and its contributors.
   22  * 4. Neither the name of The NetBSD Foundation nor the names of its
   23  *    contributors may be used to endorse or promote products derived
   24  *    from this software without specific prior written permission.
   25  *
   26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   36  * POSSIBILITY OF SUCH DAMAGE.
   37  */
   38 
   39 #ifndef _SYS_STATVFS_H_
   40 #define _SYS_STATVFS_H_
   41 
   42 #include <sys/cdefs.h>
   43 #include <sys/featuretest.h>
   44 #include <sys/stdint.h>
   45 #include <machine/ansi.h>
   46 #include <sys/ansi.h>
   47 #include <sys/fstypes.h>
   48 
   49 #define _VFS_NAMELEN    32
   50 #define _VFS_MNAMELEN   1024
   51 
   52 #ifndef fsblkcnt_t
   53 typedef __fsblkcnt_t    fsblkcnt_t;     /* fs block count (statvfs) */
   54 #define fsblkcnt_t      __fsblkcnt_t
   55 #endif
   56 
   57 #ifndef fsfilcnt_t
   58 typedef __fsfilcnt_t    fsfilcnt_t;     /* fs file count */
   59 #define fsfilcnt_t      __fsfilcnt_t
   60 #endif
   61 
   62 #ifndef uid_t
   63 typedef __uid_t         uid_t;          /* user id */
   64 #define uid_t           __uid_t
   65 #endif
   66 
   67 #ifdef  _BSD_SIZE_T_
   68 typedef _BSD_SIZE_T_            size_t;
   69 #define _SIZE_T
   70 #undef  _BSD_SIZE_T_
   71 #endif
   72 
   73 struct statvfs {
   74         unsigned long   f_flag;         /* copy of mount exported flags */
   75         unsigned long   f_bsize;        /* file system block size */
   76         unsigned long   f_frsize;       /* fundamental file system block size */
   77         unsigned long   f_iosize;       /* optimal file system block size */
   78 
   79         fsblkcnt_t      f_blocks;       /* number of blocks in file system, */
   80                                         /*   (in units of f_frsize) */
   81         fsblkcnt_t      f_bfree;        /* free blocks avail in file system */
   82         fsblkcnt_t      f_bavail;       /* free blocks avail to non-root */
   83         fsblkcnt_t      f_bresvd;       /* blocks reserved for root */
   84 
   85         fsfilcnt_t      f_files;        /* total file nodes in file system */
   86         fsfilcnt_t      f_ffree;        /* free file nodes in file system */
   87         fsfilcnt_t      f_favail;       /* free file nodes avail to non-root */
   88         fsfilcnt_t      f_fresvd;       /* file nodes reserved for root */
   89 
   90         uint64_t        f_syncreads;    /* count of sync reads since mount */
   91         uint64_t        f_syncwrites;   /* count of sync writes since mount */
   92 
   93         uint64_t        f_asyncreads;   /* count of async reads since mount */
   94         uint64_t        f_asyncwrites;  /* count of async writes since mount */
   95 
   96         fsid_t          f_fsidx;        /* NetBSD compatible fsid */
   97         unsigned long   f_fsid;         /* Posix compatible fsid */
   98         unsigned long   f_namemax;      /* maximum filename length */
   99         uid_t           f_owner;        /* user that mounted the file system */
  100 
  101         uint32_t        f_spare[4];     /* spare space */
  102 
  103         char    f_fstypename[_VFS_NAMELEN]; /* fs type name */
  104         char    f_mntonname[_VFS_MNAMELEN];  /* directory on which mounted */
  105         char    f_mntfromname[_VFS_MNAMELEN];  /* mounted file system */
  106 
  107 };
  108 
  109 #if defined(_NETBSD_SOURCE) && !defined(_POSIX_SOURCE) && \
  110     !defined(_XOPEN_SOURCE)
  111 #define VFS_NAMELEN     _VFS_NAMELEN
  112 #define VFS_MNAMELEN    _VFS_MNAMELEN
  113 #endif
  114 
  115 #define ST_RDONLY       MNT_RDONLY
  116 #define ST_NOEXEC       MNT_NOEXEC
  117 #define ST_NOSUID       MNT_NOSUID
  118 #define ST_NODEV        MNT_NODEV
  119 #define ST_SYNCHRONOUS  MNT_SYNCHRONOUS
  120 #define ST_ASYNC        MNT_ASYNC
  121 #define ST_UNION        MNT_UNION
  122 #define ST_NOCOREDUMP   MNT_NOCOREDUMP
  123 #define ST_NOATIME      MNT_NOATIME
  124 #define ST_SYMPERM      MNT_SYMPERM
  125 #define ST_NODEVMTIME   MNT_NODEVMTIME
  126 #define ST_SOFTDEP      MNT_SOFTDEP
  127 #define ST_LOCAL        MNT_LOCAL
  128 #define ST_QUOTA        MNT_QUOTA
  129 #define ST_ROOTFS       MNT_ROOTFS
  130 #define ST_EXRDONLY     MNT_EXRDONLY
  131 #define ST_EXPORTED     MNT_EXPORTED
  132 #define ST_DEFEXPORTED  MNT_DEFEXPORTED
  133 #define ST_EXPORTANON   MNT_EXPORTANON
  134 #define ST_EXKERB       MNT_EXKERB
  135 #define ST_EXNORESPORT  MNT_EXNORESPORT
  136 #define ST_EXPUBLIC     MNT_EXPUBLIC
  137 
  138 #define ST_WAIT         MNT_WAIT
  139 #define ST_NOWAIT       MNT_NOWAIT
  140 
  141 #if defined(_KERNEL) || defined(_STANDALONE)
  142 struct mount;
  143 struct proc;
  144 
  145 int     set_statvfs_info(const char *, int, const char *, int,
  146     struct mount *, struct proc *);
  147 void    copy_statvfs_info(struct statvfs *, const struct mount *);
  148 int     dostatvfs(struct mount *, struct statvfs *, struct proc *, int, int);
  149 #else
  150 __BEGIN_DECLS
  151 int     statvfs(const char *__restrict, struct statvfs *__restrict);
  152 int     fstatvfs(int, struct statvfs *);
  153 int     getvfsstat(struct statvfs *, size_t, int);
  154 #ifndef __LIBC12_SOURCE__
  155 int     getmntinfo(struct statvfs **, int)
  156     __RENAME(__getmntinfo13);
  157 #endif /* __LIBC12_SOURCE__ */
  158 #if defined(_NETBSD_SOURCE)
  159 int     fhstatvfs(const fhandle_t *, struct statvfs *);
  160 
  161 int     statvfs1(const char *__restrict, struct statvfs *__restrict, int);
  162 int     fstatvfs1(int, struct statvfs *, int);
  163 int     fhstatvfs1(const fhandle_t *, struct statvfs *, int);
  164 #endif /* _NETBSD_SOURCE */
  165 __END_DECLS
  166 #endif /* _KERNEL || _STANDALONE */
  167 #endif /* !_SYS_STATVFS_H_ */

Cache object: ecb9d19f4767f4635e062e9fa80f3805


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.