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/mount.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: mount.h,v 1.199 2011/04/02 04:57:35 rmind Exp $        */
    2 
    3 /*
    4  * Copyright (c) 1989, 1991, 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  *      @(#)mount.h     8.21 (Berkeley) 5/20/95
   32  */
   33 
   34 #ifndef _SYS_MOUNT_H_
   35 #define _SYS_MOUNT_H_
   36 
   37 #ifndef _KERNEL
   38 #include <sys/featuretest.h>
   39 #if defined(_NETBSD_SOURCE)
   40 #include <sys/stat.h>
   41 #endif /* _NETBSD_SOURCE */
   42 #endif
   43 
   44 #ifndef _STANDALONE
   45 #include <sys/time.h>
   46 #include <sys/uio.h>
   47 #include <sys/ucred.h>
   48 #include <sys/fstypes.h>
   49 #include <sys/queue.h>
   50 #include <sys/rwlock.h>
   51 #include <sys/statvfs.h>
   52 #include <sys/specificdata.h>
   53 #include <sys/condvar.h>
   54 #endif  /* !_STANDALONE */
   55 
   56 /*
   57  * file system statistics
   58  */
   59 
   60 #define MNAMELEN        90      /* length of buffer for returned name */
   61 
   62 /*
   63  * File system types.
   64  */
   65 #define MOUNT_FFS       "ffs"           /* UNIX "Fast" Filesystem */
   66 #define MOUNT_UFS       MOUNT_FFS       /* for compatibility */
   67 #define MOUNT_NFS       "nfs"           /* Network Filesystem */
   68 #define MOUNT_MFS       "mfs"           /* Memory Filesystem */
   69 #define MOUNT_MSDOS     "msdos"         /* MSDOS Filesystem */
   70 #define MOUNT_LFS       "lfs"           /* Log-based Filesystem */
   71 #define MOUNT_FDESC     "fdesc"         /* File Descriptor Filesystem */
   72 #define MOUNT_NULL      "null"          /* Minimal Filesystem Layer */
   73 #define MOUNT_OVERLAY   "overlay"       /* Minimal Overlay Filesystem Layer */
   74 #define MOUNT_UMAP      "umap"  /* User/Group Identifier Remapping Filesystem */
   75 #define MOUNT_KERNFS    "kernfs"        /* Kernel Information Filesystem */
   76 #define MOUNT_PROCFS    "procfs"        /* /proc Filesystem */
   77 #define MOUNT_AFS       "afs"           /* Andrew Filesystem */
   78 #define MOUNT_CD9660    "cd9660"        /* ISO9660 (aka CDROM) Filesystem */
   79 #define MOUNT_UNION     "union"         /* Union (translucent) Filesystem */
   80 #define MOUNT_ADOSFS    "adosfs"        /* AmigaDOS Filesystem */
   81 #define MOUNT_EXT2FS    "ext2fs"        /* Second Extended Filesystem */
   82 #define MOUNT_CFS       "coda"          /* Coda Filesystem */
   83 #define MOUNT_CODA      MOUNT_CFS       /* Coda Filesystem */
   84 #define MOUNT_FILECORE  "filecore"      /* Acorn Filecore Filesystem */
   85 #define MOUNT_NTFS      "ntfs"          /* Windows/NT Filesystem */
   86 #define MOUNT_SMBFS     "smbfs"         /* CIFS (SMB) */
   87 #define MOUNT_PTYFS     "ptyfs"         /* Pseudo tty filesystem */
   88 #define MOUNT_TMPFS     "tmpfs"         /* Efficient memory file-system */
   89 #define MOUNT_UDF       "udf"           /* UDF CD/DVD filesystem */
   90 #define MOUNT_SYSVBFS   "sysvbfs"       /* System V Boot Filesystem */
   91 #define MOUNT_PUFFS     "puffs"         /* Pass-to-Userspace filesystem */
   92 #define MOUNT_HFS       "hfs"           /* Apple HFS+ Filesystem */
   93 #define MOUNT_EFS       "efs"           /* SGI's Extent Filesystem */
   94 #define MOUNT_ZFS       "zfs"           /* Sun ZFS */
   95 #define MOUNT_NILFS     "nilfs"         /* NTT's NiLFS(2) logging file system */
   96 #define MOUNT_RUMPFS    "rumpfs"        /* rump virtual file system */
   97 
   98 #ifndef _STANDALONE
   99 
  100 struct vnode;
  101 
  102 /*
  103  * Structure per mounted file system.  Each mounted file system has an
  104  * array of operations and an instance record.  The file systems are
  105  * put on a doubly linked list.
  106  */
  107 struct mount {
  108         CIRCLEQ_ENTRY(mount) mnt_list;          /* mount list */
  109         TAILQ_HEAD(, vnode) mnt_vnodelist;      /* list of vnodes this mount */
  110         struct vfsops   *mnt_op;                /* operations on fs */
  111         struct vnode    *mnt_vnodecovered;      /* vnode we mounted on */
  112         struct vnode    *mnt_syncer;            /* syncer vnode */
  113         void            *mnt_transinfo;         /* for FS-internal use */
  114         void            *mnt_data;              /* private data */
  115         krwlock_t       mnt_unmounting;         /* to prevent new activity */
  116         kmutex_t        mnt_renamelock;         /* per-fs rename lock */
  117         int             mnt_refcnt;             /* ref count on this structure */
  118         int             mnt_recursecnt;         /* count of write locks */
  119         int             mnt_flag;               /* flags */
  120         int             mnt_iflag;              /* internal flags */
  121         int             mnt_fs_bshift;          /* offset shift for lblkno */
  122         int             mnt_dev_bshift;         /* shift for device sectors */
  123         struct statvfs  mnt_stat;               /* cache of filesystem stats */
  124         specificdata_reference
  125                         mnt_specdataref;        /* subsystem specific data */
  126         kmutex_t        mnt_updating;           /* to serialize updates */
  127         struct wapbl_ops
  128                         *mnt_wapbl_op;          /* logging ops */
  129         struct wapbl    *mnt_wapbl;             /* log info */
  130         struct wapbl_replay
  131                         *mnt_wapbl_replay;      /* replay support XXX: what? */
  132         uint64_t        mnt_gen;
  133 };
  134 
  135 /*
  136  * Sysctl CTL_VFS definitions.
  137  *
  138  * Second level identifier specifies which filesystem. Second level
  139  * identifier VFS_GENERIC returns information about all filesystems.
  140  *
  141  * Note the slightly non-flat nature of these sysctl numbers.  Oh for
  142  * a better sysctl interface.
  143  */
  144 #define VFS_GENERIC     0               /* generic filesystem information */
  145 #define VFS_MAXTYPENUM  1               /* int: highest defined fs type */
  146 #define VFS_CONF        2               /* struct: vfsconf for filesystem given
  147                                            as next argument */
  148 #define VFS_USERMOUNT   3               /* enable/disable fs mnt by non-root */
  149 #define VFS_MAGICLINKS  4               /* expand 'magic' symlinks */
  150 #define VFSGEN_MAXID    5               /* number of valid vfs.generic ids */
  151 
  152 /*
  153  * USE THE SAME NAMES AS MOUNT_*!
  154  *
  155  * Only need to add new entry here if the filesystem actually supports
  156  * sysctl(2).
  157  */
  158 #define CTL_VFS_NAMES { \
  159         { "generic", CTLTYPE_NODE }, \
  160         { MOUNT_FFS, CTLTYPE_NODE }, \
  161         { MOUNT_NFS, CTLTYPE_NODE }, \
  162         { MOUNT_MFS, CTLTYPE_NODE }, \
  163         { MOUNT_MSDOS, CTLTYPE_NODE }, \
  164         { MOUNT_LFS, CTLTYPE_NODE }, \
  165         { 0, 0 },                       /* MOUNT_LOFS */ \
  166         { MOUNT_FDESC, CTLTYPE_NODE }, \
  167         { MOUNT_NULL, CTLTYPE_NODE }, \
  168         { MOUNT_UMAP, CTLTYPE_NODE }, \
  169         { MOUNT_KERNFS, CTLTYPE_NODE }, \
  170         { MOUNT_PROCFS, CTLTYPE_NODE }, \
  171         { MOUNT_AFS, CTLTYPE_NODE }, \
  172         { MOUNT_CD9660, CTLTYPE_NODE }, \
  173         { MOUNT_UNION, CTLTYPE_NODE }, \
  174         { MOUNT_ADOSFS, CTLTYPE_NODE }, \
  175         { MOUNT_EXT2FS, CTLTYPE_NODE }, \
  176         { MOUNT_CODA, CTLTYPE_NODE }, \
  177         { MOUNT_FILECORE, CTLTYPE_NODE }, \
  178         { MOUNT_NTFS, CTLTYPE_NODE }, \
  179 }
  180 
  181 #define VFS_MAXID       20              /* number of valid vfs ids */
  182 
  183 #define CTL_VFSGENCTL_NAMES { \
  184         { 0, 0 }, \
  185         { "maxtypenum", CTLTYPE_INT }, \
  186         { "conf", CTLTYPE_NODE },       /* Special */ \
  187         { "usermount", CTLTYPE_INT }, \
  188         { "magiclinks", CTLTYPE_INT }, \
  189 }
  190 
  191 #if defined(_KERNEL)
  192 #include <prop/proplib.h>
  193 #if __STDC__
  194 struct nameidata;
  195 #endif
  196 
  197 /*
  198  * Operations supported on mounted file system.
  199  */
  200 
  201 struct vfsops {
  202         const char *vfs_name;
  203         size_t  vfs_min_mount_data;
  204         int     (*vfs_mount)    (struct mount *, const char *, void *,
  205                                     size_t *);
  206         int     (*vfs_start)    (struct mount *, int);
  207         int     (*vfs_unmount)  (struct mount *, int);
  208         int     (*vfs_root)     (struct mount *, struct vnode **);
  209         int     (*vfs_quotactl) (struct mount *, prop_dictionary_t);
  210         int     (*vfs_statvfs)  (struct mount *, struct statvfs *);
  211         int     (*vfs_sync)     (struct mount *, int, struct kauth_cred *);
  212         int     (*vfs_vget)     (struct mount *, ino_t, struct vnode **);
  213         int     (*vfs_fhtovp)   (struct mount *, struct fid *,
  214                                     struct vnode **);
  215         int     (*vfs_vptofh)   (struct vnode *, struct fid *, size_t *);
  216         void    (*vfs_init)     (void);
  217         void    (*vfs_reinit)   (void);
  218         void    (*vfs_done)     (void);
  219         int     (*vfs_mountroot)(void);
  220         int     (*vfs_snapshot) (struct mount *, struct vnode *,
  221                                     struct timespec *);
  222         int     (*vfs_extattrctl) (struct mount *, int,
  223                                     struct vnode *, int, const char *);
  224         int     (*vfs_suspendctl) (struct mount *, int);
  225         int     (*vfs_renamelock_enter)(struct mount *);
  226         void    (*vfs_renamelock_exit)(struct mount *);
  227         int     (*vfs_fsync)    (struct vnode *, int);
  228         const struct vnodeopv_desc * const *vfs_opv_descs;
  229         int     vfs_refcount;
  230         LIST_ENTRY(vfsops) vfs_list;
  231 };
  232 
  233 /* XXX vget is actually file system internal. */
  234 #define VFS_VGET(MP, INO, VPP)    (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP)
  235 
  236 #define VFS_RENAMELOCK_ENTER(MP)  (*(MP)->mnt_op->vfs_renamelock_enter)(MP)
  237 #define VFS_RENAMELOCK_EXIT(MP)   (*(MP)->mnt_op->vfs_renamelock_exit)(MP)
  238 #define VFS_FSYNC(MP, VP, FLG)    (*(MP)->mnt_op->vfs_fsync)(VP, FLG)
  239 
  240 int     VFS_MOUNT(struct mount *, const char *, void *, size_t *);
  241 int     VFS_START(struct mount *, int);
  242 int     VFS_UNMOUNT(struct mount *, int);
  243 int     VFS_ROOT(struct mount *, struct vnode **);
  244 int     VFS_QUOTACTL(struct mount *, prop_dictionary_t);
  245 int     VFS_STATVFS(struct mount *, struct statvfs *);
  246 int     VFS_SYNC(struct mount *, int, struct kauth_cred *);
  247 int     VFS_FHTOVP(struct mount *, struct fid *, struct vnode **);
  248 int     VFS_VPTOFH(struct vnode *, struct fid *, size_t *);
  249 int     VFS_SNAPSHOT(struct mount *, struct vnode *, struct timespec *);
  250 int     VFS_EXTATTRCTL(struct mount *, int, struct vnode *, int, const char *);
  251 int     VFS_SUSPENDCTL(struct mount *, int);
  252 
  253 #endif /* _KERNEL */
  254 
  255 #ifdef _KERNEL
  256 #if __STDC__
  257 struct mbuf;
  258 struct vnodeopv_desc;
  259 struct kauth_cred;
  260 #endif
  261 
  262 #define VFS_MAX_MOUNT_DATA      8192
  263 
  264 #define VFS_PROTOS(fsname)                                              \
  265 int     fsname##_mount(struct mount *, const char *, void *,            \
  266                 size_t *);                                              \
  267 int     fsname##_start(struct mount *, int);                            \
  268 int     fsname##_unmount(struct mount *, int);                          \
  269 int     fsname##_root(struct mount *, struct vnode **);                 \
  270 int     fsname##_quotactl(struct mount *, prop_dictionary_t);           \
  271 int     fsname##_statvfs(struct mount *, struct statvfs *);             \
  272 int     fsname##_sync(struct mount *, int, struct kauth_cred *);        \
  273 int     fsname##_vget(struct mount *, ino_t, struct vnode **);          \
  274 int     fsname##_fhtovp(struct mount *, struct fid *, struct vnode **); \
  275 int     fsname##_vptofh(struct vnode *, struct fid *, size_t *);        \
  276 void    fsname##_init(void);                                            \
  277 void    fsname##_reinit(void);                                          \
  278 void    fsname##_done(void);                                            \
  279 int     fsname##_mountroot(void);                                       \
  280 int     fsname##_snapshot(struct mount *, struct vnode *,               \
  281                 struct timespec *);                                     \
  282 int     fsname##_extattrctl(struct mount *, int, struct vnode *, int,   \
  283                 const char *);                                          \
  284 int     fsname##_suspendctl(struct mount *, int)
  285 
  286 /*
  287  * This operations vector is so wapbl can be wrapped into a filesystem lkm.
  288  * XXX Eventually, we want to move this functionality
  289  * down into the filesystems themselves so that this isn't needed.
  290  */
  291 struct wapbl_ops {
  292         void (*wo_wapbl_discard)(struct wapbl *);
  293         int (*wo_wapbl_replay_isopen)(struct wapbl_replay *);
  294         int (*wo_wapbl_replay_can_read)(struct wapbl_replay *, daddr_t, long);
  295         int (*wo_wapbl_replay_read)(struct wapbl_replay *, void *, daddr_t, long);
  296         void (*wo_wapbl_add_buf)(struct wapbl *, struct buf *);
  297         void (*wo_wapbl_remove_buf)(struct wapbl *, struct buf *);
  298         void (*wo_wapbl_resize_buf)(struct wapbl *, struct buf *, long, long);
  299         int (*wo_wapbl_begin)(struct wapbl *, const char *, int);
  300         void (*wo_wapbl_end)(struct wapbl *);
  301         void (*wo_wapbl_junlock_assert)(struct wapbl *);
  302         void (*wo_wapbl_biodone)(struct buf *);
  303 };
  304 #define WAPBL_DISCARD(MP)                                               \
  305     (*(MP)->mnt_wapbl_op->wo_wapbl_discard)((MP)->mnt_wapbl)
  306 #define WAPBL_REPLAY_ISOPEN(MP)                                         \
  307     (*(MP)->mnt_wapbl_op->wo_wapbl_replay_isopen)((MP)->mnt_wapbl_replay)
  308 #define WAPBL_REPLAY_CAN_READ(MP, BLK, LEN)                             \
  309     (*(MP)->mnt_wapbl_op->wo_wapbl_replay_can_read)((MP)->mnt_wapbl_replay, \
  310     (BLK), (LEN))
  311 #define WAPBL_REPLAY_READ(MP, DATA, BLK, LEN)                           \
  312     (*(MP)->mnt_wapbl_op->wo_wapbl_replay_read)((MP)->mnt_wapbl_replay, \
  313     (DATA), (BLK), (LEN))
  314 #define WAPBL_ADD_BUF(MP, BP)                                           \
  315     (*(MP)->mnt_wapbl_op->wo_wapbl_add_buf)((MP)->mnt_wapbl, (BP))
  316 #define WAPBL_REMOVE_BUF(MP, BP)                                        \
  317     (*(MP)->mnt_wapbl_op->wo_wapbl_remove_buf)((MP)->mnt_wapbl, (BP))
  318 #define WAPBL_RESIZE_BUF(MP, BP, OLDSZ, OLDCNT)                         \
  319     (*(MP)->mnt_wapbl_op->wo_wapbl_resize_buf)((MP)->mnt_wapbl, (BP),   \
  320     (OLDSZ), (OLDCNT))
  321 #define WAPBL_BEGIN(MP)                                                 \
  322     (*(MP)->mnt_wapbl_op->wo_wapbl_begin)((MP)->mnt_wapbl,              \
  323     __FILE__, __LINE__)
  324 #define WAPBL_END(MP)                                                   \
  325     (*(MP)->mnt_wapbl_op->wo_wapbl_end)((MP)->mnt_wapbl)
  326 #define WAPBL_JUNLOCK_ASSERT(MP)                                        \
  327     (*(MP)->mnt_wapbl_op->wo_wapbl_junlock_assert)((MP)->mnt_wapbl)
  328 
  329 struct vfs_hooks {
  330         LIST_ENTRY(vfs_hooks) vfs_hooks_list;
  331         void    (*vh_unmount)(struct mount *);
  332         int     (*vh_reexport)(struct mount *, const char *, void *);
  333         void    (*vh_future_expansion_1)(void);
  334         void    (*vh_future_expansion_2)(void);
  335         void    (*vh_future_expansion_3)(void);
  336         void    (*vh_future_expansion_4)(void);
  337         void    (*vh_future_expansion_5)(void);
  338 };
  339 
  340 void    vfs_hooks_init(void);
  341 int     vfs_hooks_attach(struct vfs_hooks *);
  342 int     vfs_hooks_detach(struct vfs_hooks *);
  343 void    vfs_hooks_unmount(struct mount *);
  344 int     vfs_hooks_reexport(struct mount *, const char *, void *);
  345 
  346 #endif /* _KERNEL */
  347 
  348 /*
  349  * Export arguments for local filesystem mount calls.
  350  *
  351  * This structure is deprecated and is only provided for compatibility
  352  * reasons with old binary utilities; several file systems expose an
  353  * instance of this structure in their mount arguments structure, thus
  354  * needing a padding in place of the old values.  This definition cannot
  355  * change in the future due to this reason.
  356  * XXX: This should be moved to the compat subtree but cannot be done
  357  * until we can move the mount args structures themselves.
  358  *
  359  * The current export_args structure can be found in nfs/nfs.h.
  360  */
  361 struct export_args30 {
  362         int     ex_flags;               /* export related flags */
  363         uid_t   ex_root;                /* mapping for root uid */
  364         struct  uucred ex_anon;         /* mapping for anonymous user */
  365         struct  sockaddr *ex_addr;      /* net address to which exported */
  366         int     ex_addrlen;             /* and the net address length */
  367         struct  sockaddr *ex_mask;      /* mask of valid bits in saddr */
  368         int     ex_masklen;             /* and the smask length */
  369         char    *ex_indexfile;          /* index file for WebNFS URLs */
  370 };
  371 
  372 struct mnt_export_args30 {
  373         const char *fspec;              /* Always NULL */
  374         struct export_args30 eargs;
  375 };
  376 
  377 #ifdef _KERNEL
  378 
  379 /*
  380  * exported VFS interface (see vfssubr(9))
  381  */
  382 struct  mount *vfs_getvfs(fsid_t *);    /* return vfs given fsid */
  383 int     vfs_composefh(struct vnode *, fhandle_t *, size_t *);
  384 int     vfs_composefh_alloc(struct vnode *, fhandle_t **);
  385 void    vfs_composefh_free(fhandle_t *);
  386 int     vfs_fhtovp(fhandle_t *, struct vnode **);
  387 int     vfs_mountedon(struct vnode *);/* is a vfs mounted on vp */
  388 int     vfs_mountroot(void);
  389 void    vfs_shutdown(void);         /* unmount and sync file systems */
  390 void    vfs_sync_all(struct lwp *);
  391 bool    vfs_unmountall(struct lwp *);       /* unmount file systems */
  392 bool    vfs_unmountall1(struct lwp *, bool, bool);
  393 bool    vfs_unmount_forceone(struct lwp *);
  394 int     vfs_busy(struct mount *, struct mount **);
  395 int     vfs_rootmountalloc(const char *, const char *, struct mount **);
  396 void    vfs_unbusy(struct mount *, bool, struct mount **);
  397 int     vfs_attach(struct vfsops *);
  398 int     vfs_detach(struct vfsops *);
  399 void    vfs_reinit(void);
  400 struct vfsops *vfs_getopsbyname(const char *);
  401 void    vfs_delref(struct vfsops *);
  402 void    vfs_destroy(struct mount *);
  403 void    vfs_scrubvnlist(struct mount *);
  404 struct mount *vfs_mountalloc(struct vfsops *, struct vnode *);
  405 int     vfs_stdextattrctl(struct mount *, int, struct vnode *,
  406             int, const char *);
  407 void    vfs_insmntque(struct vnode *, struct mount *);
  408 
  409 extern  CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
  410 extern  struct vfsops *vfssw[];                 /* filesystem type table */
  411 extern  int nvfssw;
  412 extern  kmutex_t mountlist_lock;
  413 extern  kmutex_t vfs_list_lock;
  414 
  415 void    vfs_mount_sysinit(void);
  416 long    makefstype(const char *);
  417 int     mount_domount(struct lwp *, struct vnode **, struct vfsops *,
  418             const char *, int, void *, size_t *);
  419 int     dounmount(struct mount *, int, struct lwp *);
  420 int     do_sys_mount(struct lwp *, struct vfsops *, const char *, const char *,
  421             int, void *, enum uio_seg, size_t, register_t *);
  422 void    vfsinit(void);
  423 void    vfs_opv_init(const struct vnodeopv_desc * const *);
  424 void    vfs_opv_free(const struct vnodeopv_desc * const *);
  425 #ifdef DEBUG
  426 void    vfs_bufstats(void);
  427 #endif
  428 
  429 int     mount_specific_key_create(specificdata_key_t *, specificdata_dtor_t);
  430 void    mount_specific_key_delete(specificdata_key_t);
  431 void    mount_initspecific(struct mount *);
  432 void    mount_finispecific(struct mount *);
  433 void *  mount_getspecific(struct mount *, specificdata_key_t);
  434 void    mount_setspecific(struct mount *, specificdata_key_t, void *);
  435 
  436 int     usermount_common_policy(struct mount *, u_long);
  437 
  438 LIST_HEAD(vfs_list_head, vfsops);
  439 extern struct vfs_list_head vfs_list;
  440 
  441 #else /* _KERNEL */
  442 
  443 #include <sys/cdefs.h>
  444 
  445 __BEGIN_DECLS
  446 #if !defined(__LIBC12_SOURCE__) && !defined(_STANDALONE)
  447 int     getfh(const char *, void *, size_t *)
  448         __RENAME(__getfh30);
  449 #endif
  450 
  451 int     unmount(const char *, int);
  452 #if defined(_NETBSD_SOURCE)
  453 #ifndef __LIBC12_SOURCE__
  454 int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
  455 int     fhopen(const void *, size_t, int) __RENAME(__fhopen40);
  456 int     fhstat(const void *, size_t, struct stat *) __RENAME(__fhstat50);
  457 #endif
  458 #endif /* _NETBSD_SOURCE */
  459 __END_DECLS
  460 
  461 #endif /* _KERNEL */
  462 #endif /* !_STANDALONE */
  463 
  464 #endif /* !_SYS_MOUNT_H_ */

Cache object: 832f5fd9e158cf0d564b202ed8829ac7


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