2005-08-31 02:01:12 +04:00
|
|
|
/* $NetBSD: ext2fs_extern.h,v 1.26 2005/08/30 22:01:12 xtraeme Exp $ */
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/*-
|
|
|
|
* Copyright (c) 1991, 1993, 1994
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2003-08-07 20:26:28 +04:00
|
|
|
* 3. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
|
|
|
|
* Modified for ext2fs by Manuel Bouyer.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*-
|
|
|
|
* Copyright (c) 1997 Manuel Bouyer.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
1997-06-11 13:33:37 +04:00
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
2003-10-05 21:48:49 +04:00
|
|
|
* This product includes software developed by Manuel Bouyer.
|
|
|
|
* 4. The name of the author may not be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
1997-06-11 13:33:37 +04:00
|
|
|
*
|
2004-03-22 22:23:08 +03:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1997-06-11 13:33:37 +04:00
|
|
|
*
|
|
|
|
* @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
|
|
|
|
* Modified for ext2fs by Manuel Bouyer.
|
|
|
|
*/
|
|
|
|
|
2002-12-01 03:12:06 +03:00
|
|
|
#ifndef _UFS_EXT2FS_EXT2FS_EXTERN_H_
|
|
|
|
#define _UFS_EXT2FS_EXT2FS_EXTERN_H_
|
|
|
|
|
1997-06-11 13:33:37 +04:00
|
|
|
struct buf;
|
|
|
|
struct fid;
|
|
|
|
struct m_ext2fs;
|
|
|
|
struct inode;
|
|
|
|
struct mount;
|
|
|
|
struct nameidata;
|
2003-06-30 02:28:00 +04:00
|
|
|
struct proc;
|
2004-04-21 05:05:31 +04:00
|
|
|
struct statvfs;
|
1997-06-11 13:33:37 +04:00
|
|
|
struct timeval;
|
|
|
|
struct ucred;
|
|
|
|
struct ufsmount;
|
|
|
|
struct uio;
|
|
|
|
struct vnode;
|
|
|
|
struct mbuf;
|
|
|
|
struct componentname;
|
|
|
|
|
1998-09-01 07:20:46 +04:00
|
|
|
extern struct pool ext2fs_inode_pool; /* memory pool for inodes */
|
2003-05-27 01:22:19 +04:00
|
|
|
extern struct pool ext2fs_dinode_pool; /* memory pool for dinodes */
|
1998-09-01 07:20:46 +04:00
|
|
|
|
1997-06-11 13:33:37 +04:00
|
|
|
__BEGIN_DECLS
|
|
|
|
|
|
|
|
/* ext2fs_alloc.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_alloc(struct inode *, daddr_t, daddr_t , struct ucred *,
|
|
|
|
daddr_t *);
|
|
|
|
int ext2fs_realloccg(struct inode *, daddr_t, daddr_t, int, int ,
|
|
|
|
struct ucred *, struct buf **);
|
|
|
|
int ext2fs_reallocblks(void *);
|
|
|
|
int ext2fs_valloc(void *);
|
2003-01-25 00:55:02 +03:00
|
|
|
/* XXX ondisk32 */
|
2005-08-31 02:01:12 +04:00
|
|
|
daddr_t ext2fs_blkpref(struct inode *, daddr_t, int, int32_t *);
|
|
|
|
void ext2fs_blkfree(struct inode *, daddr_t);
|
|
|
|
int ext2fs_vfree(void *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_balloc.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_balloc(struct inode *, daddr_t, int, struct ucred *,
|
|
|
|
struct buf **, int);
|
|
|
|
int ext2fs_gop_alloc(struct vnode *, off_t, off_t, int, struct ucred *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_bmap.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_bmap(void *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_inode.c */
|
2005-02-10 02:02:10 +03:00
|
|
|
u_int64_t ext2fs_size(struct inode *);
|
|
|
|
int ext2fs_setsize(struct inode *, u_int64_t);
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_update(void *);
|
|
|
|
int ext2fs_truncate(void *);
|
|
|
|
int ext2fs_inactive(void *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_lookup.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_readdir(void *);
|
|
|
|
int ext2fs_lookup(void *);
|
|
|
|
int ext2fs_direnter(struct inode *, struct vnode *,
|
|
|
|
struct componentname *);
|
|
|
|
int ext2fs_dirremove(struct vnode *, struct componentname *);
|
|
|
|
int ext2fs_dirrewrite(struct inode *, struct inode *,
|
|
|
|
struct componentname *);
|
|
|
|
int ext2fs_dirempty(struct inode *, ino_t, struct ucred *);
|
|
|
|
int ext2fs_checkpath(struct inode *, struct inode *, struct ucred *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_subr.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_blkatoff(void *);
|
|
|
|
void ext2fs_fragacct(struct m_ext2fs *, int, int32_t[], int);
|
1997-06-11 13:33:37 +04:00
|
|
|
#ifdef DIAGNOSTIC
|
2005-08-31 02:01:12 +04:00
|
|
|
void ext2fs_checkoverlap(struct buf *, struct inode *);
|
1997-06-11 13:33:37 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* ext2fs_vfsops.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
void ext2fs_init(void);
|
|
|
|
void ext2fs_reinit(void);
|
|
|
|
void ext2fs_done(void);
|
|
|
|
int ext2fs_mountroot(void);
|
|
|
|
int ext2fs_mount(struct mount *, const char *, void *, struct nameidata *,
|
|
|
|
struct proc *);
|
|
|
|
int ext2fs_reload(struct mount *, struct ucred *, struct proc *);
|
|
|
|
int ext2fs_mountfs(struct vnode *, struct mount *, struct proc *);
|
|
|
|
int ext2fs_unmount(struct mount *, int, struct proc *);
|
|
|
|
int ext2fs_flushfiles(struct mount *, int, struct proc *);
|
|
|
|
int ext2fs_statvfs(struct mount *, struct statvfs *, struct proc *);
|
|
|
|
int ext2fs_sync(struct mount *, int, struct ucred *, struct proc *);
|
|
|
|
int ext2fs_vget(struct mount *, ino_t, struct vnode **);
|
|
|
|
int ext2fs_fhtovp(struct mount *, struct fid *, struct vnode **);
|
|
|
|
int ext2fs_vptofh(struct vnode *, struct fid *);
|
|
|
|
int ext2fs_sbupdate(struct ufsmount *, int);
|
|
|
|
int ext2fs_cgupdate(struct ufsmount *, int);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_readwrite.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_read(void *);
|
|
|
|
int ext2fs_write(void *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
/* ext2fs_vnops.c */
|
2005-08-31 02:01:12 +04:00
|
|
|
int ext2fs_create(void *);
|
|
|
|
int ext2fs_mknod(void *);
|
|
|
|
int ext2fs_open(void *);
|
|
|
|
int ext2fs_access(void *);
|
|
|
|
int ext2fs_getattr(void *);
|
|
|
|
int ext2fs_setattr(void *);
|
|
|
|
int ext2fs_remove(void *);
|
|
|
|
int ext2fs_link(void *);
|
|
|
|
int ext2fs_rename(void *);
|
|
|
|
int ext2fs_mkdir(void *);
|
|
|
|
int ext2fs_rmdir(void *);
|
|
|
|
int ext2fs_symlink(void *);
|
|
|
|
int ext2fs_readlink(void *);
|
|
|
|
int ext2fs_advlock(void *);
|
|
|
|
int ext2fs_vinit(struct mount *, int (**specops)(void *),
|
|
|
|
int (**fifoops)(void *), struct vnode **);
|
|
|
|
int ext2fs_makeinode(int, struct vnode *, struct vnode **,
|
|
|
|
struct componentname *cnp);
|
|
|
|
int ext2fs_reclaim(void *);
|
1997-06-11 13:33:37 +04:00
|
|
|
|
|
|
|
#define ext2fs_fsync genfs_fsync
|
2004-05-20 10:34:24 +04:00
|
|
|
|
|
|
|
#ifdef SYSCTL_SETUP_PROTO
|
|
|
|
SYSCTL_SETUP_PROTO(sysctl_vfs_ext2fs_setup);
|
|
|
|
#endif /* SYSCTL_SETUP_PROTO */
|
1997-06-11 13:33:37 +04:00
|
|
|
__END_DECLS
|
|
|
|
|
|
|
|
#define IS_EXT2_VNODE(vp) (vp->v_tag == VT_EXT2FS)
|
|
|
|
|
2005-08-31 02:01:12 +04:00
|
|
|
extern int (**ext2fs_vnodeop_p)(void *);
|
|
|
|
extern int (**ext2fs_specop_p)(void *);
|
|
|
|
extern int (**ext2fs_fifoop_p)(void *);
|
1998-06-25 00:58:44 +04:00
|
|
|
|
2002-12-01 03:12:06 +03:00
|
|
|
#endif /* !_UFS_EXT2FS_EXT2FS_EXTERN_H_ */
|