1e09c00caSUlf Lilleengen /*- 2e09c00caSUlf Lilleengen * modified for EXT2FS support in Lites 1.1 3e09c00caSUlf Lilleengen * 4e09c00caSUlf Lilleengen * Aug 1995, Godmar Back (gback@cs.utah.edu) 5e09c00caSUlf Lilleengen * University of Utah, Department of Computer Science 6e09c00caSUlf Lilleengen */ 7e09c00caSUlf Lilleengen /*- 8e09c00caSUlf Lilleengen * Copyright (c) 1991, 1993, 1994 9e09c00caSUlf Lilleengen * The Regents of the University of California. All rights reserved. 10e09c00caSUlf Lilleengen * 11e09c00caSUlf Lilleengen * Redistribution and use in source and binary forms, with or without 12e09c00caSUlf Lilleengen * modification, are permitted provided that the following conditions 13e09c00caSUlf Lilleengen * are met: 14e09c00caSUlf Lilleengen * 1. Redistributions of source code must retain the above copyright 15e09c00caSUlf Lilleengen * notice, this list of conditions and the following disclaimer. 16e09c00caSUlf Lilleengen * 2. Redistributions in binary form must reproduce the above copyright 17e09c00caSUlf Lilleengen * notice, this list of conditions and the following disclaimer in the 18e09c00caSUlf Lilleengen * documentation and/or other materials provided with the distribution. 19e09c00caSUlf Lilleengen * 4. Neither the name of the University nor the names of its contributors 20e09c00caSUlf Lilleengen * may be used to endorse or promote products derived from this software 21e09c00caSUlf Lilleengen * without specific prior written permission. 22e09c00caSUlf Lilleengen * 23e09c00caSUlf Lilleengen * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24e09c00caSUlf Lilleengen * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25e09c00caSUlf Lilleengen * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26e09c00caSUlf Lilleengen * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27e09c00caSUlf Lilleengen * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28e09c00caSUlf Lilleengen * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29e09c00caSUlf Lilleengen * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30e09c00caSUlf Lilleengen * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31e09c00caSUlf Lilleengen * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32e09c00caSUlf Lilleengen * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33e09c00caSUlf Lilleengen * SUCH DAMAGE. 34e09c00caSUlf Lilleengen * 35e09c00caSUlf Lilleengen * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94 36e09c00caSUlf Lilleengen * $FreeBSD$ 37e09c00caSUlf Lilleengen */ 38e09c00caSUlf Lilleengen 39e09c00caSUlf Lilleengen #ifndef _FS_EXT2FS_EXT2_EXTERN_H_ 40e09c00caSUlf Lilleengen #define _FS_EXT2FS_EXT2_EXTERN_H_ 41e09c00caSUlf Lilleengen 42e09c00caSUlf Lilleengen struct ext2fs_dinode; 43e09c00caSUlf Lilleengen struct indir; 44e09c00caSUlf Lilleengen struct inode; 45e09c00caSUlf Lilleengen struct mount; 46e09c00caSUlf Lilleengen struct vfsconf; 47e09c00caSUlf Lilleengen struct vnode; 48e09c00caSUlf Lilleengen 49e09c00caSUlf Lilleengen int ext2_alloc(struct inode *, 50e09c00caSUlf Lilleengen int32_t, int32_t, int, struct ucred *, int32_t *); 51e09c00caSUlf Lilleengen int ext2_balloc(struct inode *, 52e09c00caSUlf Lilleengen int32_t, int, struct ucred *, struct buf **, int); 53e09c00caSUlf Lilleengen int ext2_blkatoff(struct vnode *, off_t, char **, struct buf **); 54e09c00caSUlf Lilleengen void ext2_blkfree(struct inode *, int32_t, long); 55e09c00caSUlf Lilleengen int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t); 56e09c00caSUlf Lilleengen int ext2_bmap(struct vop_bmap_args *); 57e09c00caSUlf Lilleengen int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *); 58e09c00caSUlf Lilleengen void ext2_dirbad(struct inode *ip, doff_t offset, char *how); 59e09c00caSUlf Lilleengen void ext2_ei2i(struct ext2fs_dinode *, struct inode *); 60e09c00caSUlf Lilleengen int ext2_getlbns(struct vnode *, int32_t, struct indir *, int *); 61e09c00caSUlf Lilleengen void ext2_i2ei(struct inode *, struct ext2fs_dinode *); 62e09c00caSUlf Lilleengen void ext2_itimes(struct vnode *vp); 63e09c00caSUlf Lilleengen int ext2_reallocblks(struct vop_reallocblks_args *); 64e09c00caSUlf Lilleengen int ext2_reclaim(struct vop_reclaim_args *); 65e09c00caSUlf Lilleengen void ext2_setblock(struct m_ext2fs *, u_char *, int32_t); 66e09c00caSUlf Lilleengen int ext2_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *); 67e09c00caSUlf Lilleengen int ext2_update(struct vnode *, int); 68e09c00caSUlf Lilleengen int ext2_valloc(struct vnode *, int, struct ucred *, struct vnode **); 69e09c00caSUlf Lilleengen int ext2_vfree(struct vnode *, ino_t, int); 70e09c00caSUlf Lilleengen int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp); 71e09c00caSUlf Lilleengen int ext2_lookup(struct vop_cachedlookup_args *); 72e09c00caSUlf Lilleengen int ext2_readdir(struct vop_readdir_args *); 73e09c00caSUlf Lilleengen void ext2_print_inode(struct inode *); 74e09c00caSUlf Lilleengen int ext2_direnter(struct inode *, 75e09c00caSUlf Lilleengen struct vnode *, struct componentname *); 76e09c00caSUlf Lilleengen int ext2_dirremove(struct vnode *, struct componentname *); 77e09c00caSUlf Lilleengen int ext2_dirrewrite(struct inode *, 78e09c00caSUlf Lilleengen struct inode *, struct componentname *); 79e09c00caSUlf Lilleengen int ext2_dirempty(struct inode *, ino_t, struct ucred *); 80e09c00caSUlf Lilleengen int ext2_checkpath(struct inode *, struct inode *, struct ucred *); 81e09c00caSUlf Lilleengen int cg_has_sb(int i); 82e09c00caSUlf Lilleengen int ext2_inactive(struct vop_inactive_args *); 83e09c00caSUlf Lilleengen 84*9e880b87SJohn Baldwin /* Flags to low-level allocation routines. 85*9e880b87SJohn Baldwin * The low 16-bits are reserved for IO_ flags from vnode.h. 86*9e880b87SJohn Baldwin */ 87*9e880b87SJohn Baldwin #define BA_CLRBUF 0x00010000 /* Clear invalid areas of buffer. */ 88*9e880b87SJohn Baldwin #define BA_SEQMASK 0x7F000000 /* Bits holding seq heuristic. */ 89*9e880b87SJohn Baldwin #define BA_SEQSHIFT 24 90*9e880b87SJohn Baldwin #define BA_SEQMAX 0x7F 91e09c00caSUlf Lilleengen 92e09c00caSUlf Lilleengen extern struct vop_vector ext2_vnodeops; 93e09c00caSUlf Lilleengen extern struct vop_vector ext2_fifoops; 94e09c00caSUlf Lilleengen 95e09c00caSUlf Lilleengen #endif /* !_FS_EXT2FS_EXT2_EXTERN_H_ */ 96