ufs_extern.h revision 105422
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software 14 * must display the following acknowledgement: 15 * This product includes software developed by the University of 16 * California, Berkeley and its contributors. 17 * 4. Neither the name of the University nor the names of its contributors 18 * may be used to endorse or promote products derived from this software 19 * without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95 34 * $FreeBSD: head/sys/ufs/ufs/ufs_extern.h 105422 2002-10-18 22:52:41Z dillon $ 35 */ 36 37#ifndef _UFS_UFS_EXTERN_H_ 38#define _UFS_UFS_EXTERN_H_ 39 40struct componentname; 41struct direct; 42struct indir; 43struct inode; 44struct mount; 45struct netcred; 46struct thread; 47struct sockaddr; 48struct ucred; 49struct ufid; 50struct vfsconf; 51struct vnode; 52struct vop_bmap_args; 53struct vop_cachedlookup_args; 54struct vop_generic_args; 55struct vop_inactive_args; 56struct vop_reclaim_args; 57 58int ufs_vnoperate(struct vop_generic_args *); 59int ufs_vnoperatefifo(struct vop_generic_args *); 60int ufs_vnoperatespec(struct vop_generic_args *); 61 62int ufs_bmap(struct vop_bmap_args *); 63int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, 64 struct buf *, int *, int *); 65int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); 66int ufs_checkpath(struct inode *, struct inode *, struct ucred *); 67void ufs_dirbad(struct inode *, doff_t, char *); 68int ufs_dirbadentry(struct vnode *, struct direct *, int); 69int ufs_dirempty(struct inode *, ino_t, struct ucred *); 70int ufs_extread(struct vop_read_args *); 71int ufs_extwrite(struct vop_write_args *); 72void ufs_makedirentry(struct inode *, struct componentname *, 73 struct direct *); 74int ufs_direnter(struct vnode *, struct vnode *, struct direct *, 75 struct componentname *, struct buf *); 76int ufs_dirremove(struct vnode *, struct inode *, int, int); 77int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); 78int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); 79int ufs_ihashget(dev_t, ino_t, int, struct vnode **); 80void ufs_ihashinit(void); 81int ufs_ihashins(struct inode *, int, struct vnode **); 82struct vnode * 83 ufs_ihashlookup(dev_t, ino_t); 84void ufs_ihashrem(struct inode *); 85void ufs_ihashuninit(void); 86int ufs_inactive(struct vop_inactive_args *); 87int ufs_init(struct vfsconf *); 88void ufs_itimes(struct vnode *vp); 89int ufs_lookup(struct vop_cachedlookup_args *); 90int ufs_readdir(struct vop_readdir_args *); 91int ufs_reclaim(struct vop_reclaim_args *); 92void ffs_snapgone(struct inode *); 93vfs_root_t ufs_root; 94vfs_start_t ufs_start; 95int ufs_uninit(struct vfsconf *); 96int ufs_vinit(struct mount *, vop_t **, vop_t **, struct vnode **); 97 98/* 99 * Soft update function prototypes. 100 */ 101int softdep_setup_directory_add(struct buf *, struct inode *, off_t, 102 ino_t, struct buf *, int); 103void softdep_change_directoryentry_offset(struct inode *, caddr_t, 104 caddr_t, caddr_t, int); 105void softdep_setup_remove(struct buf *,struct inode *, struct inode *, int); 106void softdep_setup_directory_change(struct buf *, struct inode *, 107 struct inode *, ino_t, int); 108void softdep_change_linkcnt(struct inode *); 109void softdep_releasefile(struct inode *); 110int softdep_slowdown(struct vnode *); 111 112/* 113 * Flags to low-level allocation routines. The low 16-bits are reserved 114 * for IO_ flags from vnode.h. 115 * 116 * Note: The general vfs code typically limits the sequential heuristic 117 * count to 127. See sequential_heuristic() in kern/vfs_vnops.c 118 */ 119#define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */ 120#define BA_METAONLY 0x00020000 /* Return indirect block buffer. */ 121#define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */ 122#define BA_SEQSHIFT 24 123#define BA_SEQMAX 0x7F 124 125#endif /* !_UFS_UFS_EXTERN_H_ */ 126