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/ufs/ufs/ufsmount.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: ufsmount.h,v 1.15 2004/01/09 19:10:22 dbj Exp $        */
    2 
    3 /*
    4  * Copyright (c) 1982, 1986, 1989, 1993
    5  *      The Regents of the University of California.  All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. Neither the name of the University nor the names of its contributors
   16  *    may be used to endorse or promote products derived from this software
   17  *    without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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  *      @(#)ufsmount.h  8.6 (Berkeley) 3/30/95
   32  */
   33 
   34 #ifndef _UFS_UFS_UFSMOUNT_H_
   35 #define _UFS_UFS_UFSMOUNT_H_
   36 
   37 /*
   38  * Arguments to mount UFS-based filesystems
   39  */
   40 struct ufs_args {
   41         char    *fspec;                 /* block special device to mount */
   42         struct  export_args export;     /* network export information */
   43 };
   44 
   45 /*
   46  * Arguments to mount MFS
   47  */
   48 struct mfs_args {
   49         char    *fspec;                 /* name to export for statfs */
   50         struct  export_args export;     /* if exported MFSes are supported */
   51         caddr_t base;                   /* base of file system in memory */
   52         u_long  size;                   /* size of file system */
   53 };
   54 
   55 #ifdef _KERNEL
   56 
   57 #if defined(_KERNEL_OPT)
   58 #include "opt_ffs.h"
   59 #endif
   60 
   61 struct buf;
   62 struct inode;
   63 struct nameidata;
   64 struct timeval;
   65 struct ucred;
   66 struct uio;
   67 struct vnode;
   68 struct netexport;
   69 
   70 /* This structure describes the UFS specific mount structure data. */
   71 struct ufsmount {
   72         struct  mount *um_mountp;               /* filesystem vfs structure */
   73         dev_t   um_dev;                         /* device mounted */
   74         struct  vnode *um_devvp;                /* block device mounted vnode */
   75         u_long  um_fstype;
   76         u_int32_t um_flags;                     /* UFS-specific flags - see below */
   77         union {                                 /* pointer to superblock */
   78                 struct  fs *fs;                 /* FFS */
   79                 struct  lfs *lfs;               /* LFS */
   80                 struct  m_ext2fs *e2fs; /* EXT2FS */
   81         } ufsmount_u;
   82 #define um_fs   ufsmount_u.fs
   83 #define um_lfs  ufsmount_u.lfs
   84 #define um_e2fs ufsmount_u.e2fs
   85 #define um_e2fsb ufsmount_u.e2fs->s_es
   86 
   87         struct  vnode *um_quotas[MAXQUOTAS];    /* pointer to quota files */
   88         struct  ucred *um_cred[MAXQUOTAS];      /* quota file access cred */
   89         u_long  um_nindir;                      /* indirect ptrs per block */
   90         u_long  um_lognindir;                   /* log2 of um_nindir */
   91         u_long  um_bptrtodb;                    /* indir ptr to disk block */
   92         u_long  um_seqinc;                      /* inc between seq blocks */
   93         time_t  um_btime[MAXQUOTAS];            /* block quota time limit */
   94         time_t  um_itime[MAXQUOTAS];            /* inode quota time limit */
   95         char    um_qflags[MAXQUOTAS];           /* quota specific flags */
   96         struct  netexport um_export;            /* export information */
   97         void    *um_oldfscompat;                        /* save 4.2 rotbl */
   98 };
   99 
  100 /* UFS-specific flags */
  101 #define UFS_NEEDSWAP    0x01    /* filesystem metadata need byte-swapping */
  102 #define UFS_ISAPPLEUFS  0x02    /* filesystem is Apple UFS */
  103 
  104 /*
  105  * Filesystem types
  106  */
  107 #define UFS1  1
  108 #define UFS2  2
  109 
  110 
  111 /*
  112  * Flags describing the state of quotas.
  113  */
  114 #define QTF_OPENING     0x01                    /* Q_QUOTAON in progress */
  115 #define QTF_CLOSING     0x02                    /* Q_QUOTAOFF in progress */
  116 
  117 /* Convert mount ptr to ufsmount ptr. */
  118 #define VFSTOUFS(mp)    ((struct ufsmount *)((mp)->mnt_data))
  119 
  120 #ifdef APPLE_UFS
  121 #define UFS_MPISAPPLEUFS(mp)    (VFSTOUFS(mp)->um_flags & UFS_ISAPPLEUFS)
  122 #else
  123 #define UFS_MPISAPPLEUFS(mp)    (0)
  124 #endif
  125 
  126 /*
  127  * Macros to access file system parameters in the ufsmount structure.
  128  * Used by ufs_bmap.
  129  */
  130 #define MNINDIR(ump)                    ((ump)->um_nindir)
  131 #define blkptrtodb(ump, b)              ((b) << (ump)->um_bptrtodb)
  132 #endif /* _KERNEL */
  133 
  134 #endif /* !_UFS_UFS_UFSMOUNT_H_ */

Cache object: cb2232472895f2a04317c96df1046256


[ 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.