2 * modified for EXT2FS support in Lites 1.1
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
8 * Copyright (c) 1991, 1993, 1994
9 * The Regents of the University of California. All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
40 * $FreeBSD: src/sys/gnu/ext2fs/ext2_extern.h,v 1.22.6.1 2000/11/05 19:17:40 bde Exp $
41 * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_extern.h,v 1.12 2006/09/10 01:26:40 dillon Exp $
44 #ifndef _VFS_GNU_EXT2FS_EXT2_EXTERN_H_
45 #define _VFS_GNU_EXT2FS_EXT2_EXTERN_H_
55 int ext2_alloc (struct inode
*,
56 daddr_t
, daddr_t
, int, struct ucred
*, daddr_t
*);
57 int ext2_balloc (struct inode
*,
58 daddr_t
, int, struct ucred
*, struct buf
**, int);
59 int ext2_blkatoff (struct vnode
*, off_t
, char **, struct buf
**);
60 void ext2_blkfree (struct inode
*, daddr_t
, long);
61 daddr_t
ext2_blkpref (struct inode
*, daddr_t
, int, daddr_t
*, daddr_t
);
62 int ext2_bmap (struct vop_bmap_args
*);
63 int ext2_reallocblks (struct vop_reallocblks_args
*);
64 int ext2_reclaim (struct vop_reclaim_args
*);
65 void ext2_setblock (struct ext2_sb_info
*, u_char
*, daddr_t
);
66 int ext2_truncate (struct vnode
*, off_t
, int, struct ucred
*);
67 int ext2_update (struct vnode
*, int);
68 int ext2_valloc (struct vnode
*, int, struct ucred
*, struct vnode
**);
69 int ext2_vfree (struct vnode
*, ino_t
, int);
70 int ext2_lookup (struct vop_old_lookup_args
*);
71 int ext2_readdir (struct vop_readdir_args
*);
72 void ext2_print_dinode (struct ext2_dinode
*);
73 void ext2_print_inode (struct inode
*);
74 int ext2_direnter (struct inode
*,
75 struct vnode
*, struct componentname
*);
76 int ext2_dirremove (struct vnode
*, struct componentname
*);
77 int ext2_dirrewrite (struct inode
*,
78 struct inode
*, struct componentname
*);
79 int ext2_dirempty (struct inode
*, ino_t
, struct ucred
*);
80 int ext2_checkpath (struct inode
*, struct inode
*, struct ucred
*);
81 struct ext2_group_desc
* get_group_desc (struct mount
* ,
82 unsigned int , struct buf
** );
83 int ext2_group_sparse (int group
);
84 void ext2_discard_prealloc (struct inode
*);
85 int ext2_inactive (struct vop_inactive_args
*);
86 int ext2_new_block (struct mount
* mp
, unsigned long goal
,
87 u_int32_t
* prealloc_count
,
88 u_int32_t
* prealloc_block
);
89 ino_t
ext2_new_inode (const struct inode
* dir
, int mode
);
90 unsigned long ext2_count_free (struct buf
*map
, unsigned int numchars
);
91 void ext2_free_blocks (struct mount
* mp
, unsigned long block
,
93 void ext2_free_inode (struct inode
* inode
);
94 void ext2_ei2di (struct ext2_inode
*ei
, struct ext2_dinode
*di
);
95 void ext2_di2ei (struct ext2_dinode
*di
, struct ext2_inode
*ei
);
96 void mark_buffer_dirty (struct buf
*bh
);
98 int ext2_getlbns(struct vnode
*, ext2_daddr_t
, struct indir
*, int *);
99 void ext2_itimes(struct vnode
*vp
);
100 struct vnode
*ext2_ihashget(cdev_t
, ino_t
);
101 int ext2_ihashins(struct inode
*);
102 void ext2_ihashrem(struct inode
*);
103 void ext2_dirbad(struct inode
*, doff_t
, char *);
104 int ext2_check_export(struct mount
*, struct sockaddr
*, int *,
106 int ext2_vinit(struct mount
*, struct vnode
**);
107 int ext2_vnoperate(struct vop_generic_args
*);
108 int ext2_vnoperatefifo(struct vop_generic_args
*);
109 int ext2_vnoperatespec(struct vop_generic_args
*);
110 int ext2_uninit(struct vfsconf
*);
111 void ext2_ihashinit(void);
112 struct vnode
*ext2_ihashlookup(cdev_t dev
, ino_t inum
);
113 int ext2_ihashcheck(cdev_t dev
, ino_t inum
);
116 * This macro allows the ufs code to distinguish between an EXT2 and a
117 * non-ext2(FFS/LFS) vnode.
119 #define IS_EXT2_VNODE(vp) (vp->v_mount->mnt_stat.f_type == MOUNT_EXT2FS)
121 #endif /* !_VFS_GNU_EXT2FS_EXT2_EXTERN_H_ */