Home | History | Annotate | Line # | Download | only in lfs
ulfs_extern.h revision 1.6.4.1
      1  1.6.4.1     rmind /*	$NetBSD: ulfs_extern.h,v 1.6.4.1 2013/08/28 23:59:38 rmind Exp $	*/
      2      1.1  dholland /*  from NetBSD: ufs_extern.h,v 1.72 2012/05/09 00:21:18 riastradh Exp  */
      3      1.1  dholland 
      4      1.1  dholland /*-
      5      1.1  dholland  * Copyright (c) 1991, 1993, 1994
      6      1.1  dholland  *	The Regents of the University of California.  All rights reserved.
      7      1.1  dholland  *
      8      1.1  dholland  * Redistribution and use in source and binary forms, with or without
      9      1.1  dholland  * modification, are permitted provided that the following conditions
     10      1.1  dholland  * are met:
     11      1.1  dholland  * 1. Redistributions of source code must retain the above copyright
     12      1.1  dholland  *    notice, this list of conditions and the following disclaimer.
     13      1.1  dholland  * 2. Redistributions in binary form must reproduce the above copyright
     14      1.1  dholland  *    notice, this list of conditions and the following disclaimer in the
     15      1.1  dholland  *    documentation and/or other materials provided with the distribution.
     16      1.1  dholland  * 3. Neither the name of the University nor the names of its contributors
     17      1.1  dholland  *    may be used to endorse or promote products derived from this software
     18      1.1  dholland  *    without specific prior written permission.
     19      1.1  dholland  *
     20      1.1  dholland  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     21      1.1  dholland  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     22      1.1  dholland  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23      1.1  dholland  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     24      1.1  dholland  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25      1.1  dholland  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     26      1.1  dholland  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27      1.1  dholland  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28      1.1  dholland  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29      1.1  dholland  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30      1.1  dholland  * SUCH DAMAGE.
     31      1.1  dholland  *
     32      1.1  dholland  *	@(#)ufs_extern.h	8.10 (Berkeley) 5/14/95
     33      1.1  dholland  */
     34      1.1  dholland 
     35      1.2  dholland #ifndef _UFS_LFS_ULFS_EXTERN_H_
     36      1.2  dholland #define _UFS_LFS_ULFS_EXTERN_H_
     37      1.1  dholland 
     38      1.1  dholland #include <sys/mutex.h>
     39      1.1  dholland 
     40      1.1  dholland struct buf;
     41      1.1  dholland struct componentname;
     42      1.1  dholland struct disklabel;
     43      1.1  dholland struct dquot;
     44      1.1  dholland struct fid;
     45      1.1  dholland struct flock;
     46      1.1  dholland struct indir;
     47      1.1  dholland struct inode;
     48      1.1  dholland struct mbuf;
     49      1.1  dholland struct mount;
     50      1.1  dholland struct nameidata;
     51      1.6  dholland struct lfs_direct;
     52      1.1  dholland struct lwp;
     53      1.2  dholland struct ulfs_args;
     54      1.2  dholland struct ulfs_lookup_results;
     55      1.6  dholland struct ulfs_ufid;
     56      1.2  dholland struct ulfsmount;
     57      1.1  dholland struct uio;
     58      1.1  dholland struct vattr;
     59      1.1  dholland struct vnode;
     60      1.1  dholland 
     61      1.6  dholland extern pool_cache_t ulfs_direct_cache;	/* memory pool for lfs_directs */
     62      1.1  dholland 
     63      1.1  dholland __BEGIN_DECLS
     64      1.2  dholland #define	ulfs_abortop	genfs_abortop
     65      1.2  dholland int	ulfs_access(void *);
     66      1.2  dholland int	ulfs_advlock(void *);
     67      1.2  dholland int	ulfs_bmap(void *);
     68      1.2  dholland int	ulfs_close(void *);
     69      1.2  dholland int	ulfs_create(void *);
     70      1.2  dholland int	ulfs_getattr(void *);
     71      1.2  dholland int	ulfs_inactive(void *);
     72      1.2  dholland #define	ulfs_fcntl	genfs_fcntl
     73      1.2  dholland #define	ulfs_ioctl	genfs_enoioctl
     74      1.2  dholland #define	ulfs_islocked	genfs_islocked
     75      1.2  dholland int	ulfs_link(void *);
     76      1.2  dholland #define	ulfs_lock	genfs_lock
     77      1.2  dholland int	ulfs_lookup(void *);
     78      1.2  dholland int	ulfs_mkdir(void *);
     79      1.2  dholland int	ulfs_mknod(void *);
     80      1.2  dholland #define	ulfs_mmap	genfs_mmap
     81      1.2  dholland #define	ulfs_revoke	genfs_revoke
     82      1.2  dholland int	ulfs_open(void *);
     83      1.2  dholland int	ulfs_pathconf(void *);
     84      1.2  dholland int	ulfs_print(void *);
     85      1.2  dholland int	ulfs_readdir(void *);
     86      1.2  dholland int	ulfs_readlink(void *);
     87      1.2  dholland int	ulfs_remove(void *);
     88      1.2  dholland int	ulfs_rmdir(void *);
     89      1.2  dholland #define	ulfs_seek	genfs_seek
     90      1.2  dholland #define	ulfs_poll	genfs_poll
     91      1.2  dholland int	ulfs_setattr(void *);
     92      1.2  dholland int	ulfs_strategy(void *);
     93      1.2  dholland int	ulfs_symlink(void *);
     94      1.2  dholland #define	ulfs_unlock	genfs_unlock
     95      1.2  dholland int	ulfs_whiteout(void *);
     96      1.2  dholland int	ulfsspec_close(void *);
     97      1.2  dholland int	ulfsspec_read(void *);
     98      1.2  dholland int	ulfsspec_write(void *);
     99      1.2  dholland 
    100      1.2  dholland int	ulfsfifo_read(void *);
    101      1.2  dholland int	ulfsfifo_write(void *);
    102      1.2  dholland int	ulfsfifo_close(void *);
    103      1.1  dholland 
    104      1.2  dholland /* ulfs_bmap.c */
    105  1.6.4.1     rmind typedef	bool (*ulfs_issequential_callback_t)(const struct lfs *,
    106      1.1  dholland 						 daddr_t, daddr_t);
    107      1.2  dholland int	ulfs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *,
    108      1.2  dholland 		      int *, int *, ulfs_issequential_callback_t);
    109      1.2  dholland int	ulfs_getlbns(struct vnode *, daddr_t, struct indir *, int *);
    110      1.2  dholland 
    111      1.2  dholland /* ulfs_ihash.c */
    112      1.2  dholland void	ulfs_ihashinit(void);
    113      1.2  dholland void	ulfs_ihashreinit(void);
    114      1.2  dholland void	ulfs_ihashdone(void);
    115      1.2  dholland struct vnode *ulfs_ihashlookup(dev_t, ino_t);
    116      1.2  dholland struct vnode *ulfs_ihashget(dev_t, ino_t, int);
    117      1.2  dholland void	ulfs_ihashins(struct inode *);
    118      1.2  dholland void	ulfs_ihashrem(struct inode *);
    119      1.2  dholland 
    120      1.2  dholland /* ulfs_inode.c */
    121      1.2  dholland int	ulfs_reclaim(struct vnode *);
    122      1.2  dholland int	ulfs_balloc_range(struct vnode *, off_t, off_t, kauth_cred_t, int);
    123      1.2  dholland 
    124      1.2  dholland /* ulfs_lookup.c */
    125      1.2  dholland void	ulfs_dirbad(struct inode *, doff_t, const char *);
    126      1.6  dholland int	ulfs_dirbadentry(struct vnode *, struct lfs_direct *, int);
    127      1.2  dholland void	ulfs_makedirentry(struct inode *, struct componentname *,
    128      1.6  dholland 			 struct lfs_direct *);
    129      1.2  dholland int	ulfs_direnter(struct vnode *, const struct ulfs_lookup_results *,
    130      1.6  dholland 		     struct vnode *, struct lfs_direct *,
    131      1.1  dholland 		     struct componentname *, struct buf *);
    132      1.2  dholland int	ulfs_dirremove(struct vnode *, const struct ulfs_lookup_results *,
    133      1.1  dholland 		      struct inode *, int, int);
    134      1.2  dholland int	ulfs_dirrewrite(struct inode *, off_t,
    135      1.1  dholland 		       struct inode *, ino_t, int, int, int);
    136      1.2  dholland int	ulfs_dirempty(struct inode *, ino_t, kauth_cred_t);
    137      1.2  dholland int	ulfs_checkpath(struct inode *, struct inode *, kauth_cred_t);
    138      1.2  dholland int	ulfs_parentcheck(struct vnode *, struct vnode *, kauth_cred_t,
    139      1.1  dholland 			int *, struct vnode **);
    140      1.2  dholland int	ulfs_blkatoff(struct vnode *, off_t, char **, struct buf **, bool);
    141      1.1  dholland 
    142      1.2  dholland /* ulfs_quota.c */
    143      1.1  dholland /*
    144      1.3  dholland  * Flags to lfs_chkdq() and lfs_chkiq()
    145      1.1  dholland  */
    146      1.1  dholland #define	FORCE	0x01	/* force usage changes independent of limits */
    147      1.2  dholland void	ulfsquota_init(struct inode *);
    148      1.2  dholland void	ulfsquota_free(struct inode *);
    149      1.3  dholland int	lfs_chkdq(struct inode *, int64_t, kauth_cred_t, int);
    150      1.3  dholland int	lfs_chkiq(struct inode *, int32_t, kauth_cred_t, int);
    151      1.3  dholland int	lfsquota_handle_cmd(struct mount *, struct lwp *,
    152      1.1  dholland 			 struct quotactl_args *);
    153      1.1  dholland 
    154      1.3  dholland int	lfs_qsync(struct mount *);
    155      1.1  dholland 
    156      1.2  dholland /* ulfs_quota1.c */
    157      1.3  dholland int	lfsquota1_umount(struct mount *, int);
    158      1.1  dholland 
    159      1.2  dholland /* ulfs_quota2.c */
    160      1.3  dholland int	lfsquota2_umount(struct mount *, int);
    161  1.6.4.1     rmind int	lfs_quota2_mount(struct mount *);
    162      1.1  dholland 
    163      1.2  dholland /* ulfs_vfsops.c */
    164      1.2  dholland void	ulfs_init(void);
    165      1.2  dholland void	ulfs_reinit(void);
    166      1.2  dholland void	ulfs_done(void);
    167      1.2  dholland int	ulfs_start(struct mount *, int);
    168      1.2  dholland int	ulfs_root(struct mount *, struct vnode **);
    169      1.2  dholland int	ulfs_quotactl(struct mount *, struct quotactl_args *);
    170      1.5  dholland int	ulfs_fhtovp(struct mount *, struct ulfs_ufid *, struct vnode **);
    171      1.1  dholland 
    172      1.2  dholland /* ulfs_vnops.c */
    173      1.2  dholland void	ulfs_vinit(struct mount *, int (**)(void *),
    174      1.1  dholland 		  int (**)(void *), struct vnode **);
    175      1.2  dholland int	ulfs_makeinode(int, struct vnode *, const struct ulfs_lookup_results *,
    176      1.1  dholland 		      struct vnode **, struct componentname *);
    177      1.2  dholland int	ulfs_gop_alloc(struct vnode *, off_t, off_t, int, kauth_cred_t);
    178      1.2  dholland void	ulfs_gop_markupdate(struct vnode *, int);
    179      1.1  dholland 
    180      1.1  dholland /*
    181      1.1  dholland  * Snapshot function prototypes.
    182      1.1  dholland  */
    183      1.1  dholland 
    184      1.4  dholland void	ulfs_snapgone(struct inode *);
    185      1.1  dholland 
    186      1.1  dholland __END_DECLS
    187      1.1  dholland 
    188      1.2  dholland extern kmutex_t ulfs_ihash_lock;
    189      1.2  dholland extern kmutex_t ulfs_hashlock;
    190      1.1  dholland 
    191      1.2  dholland #endif /* !_UFS_LFS_ULFS_EXTERN_H_ */
    192