1 /* $NetBSD: efs_subr.h,v 1.1 2007/06/29 23:30:30 rumble Exp $ */
4 * Copyright (c) 2006 Stephen M. Rumble <rumble@ephemeral.org>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef _FS_EFS_EFS_SUBR_H_
20 #define _FS_EFS_EFS_SUBR_H_
22 extern struct pool efs_inode_pool
;
24 struct efs_extent_iterator
{
25 struct efs_inode
*exi_eip
;
26 off_t exi_next
; /* next logical extent*/
27 off_t exi_dnext
; /* next direct extent */
28 off_t exi_innext
; /* next indirect ext. */
31 int32_t efs_sb_checksum(struct efs_sb
*, int);
32 int efs_sb_validate(struct efs_sb
*, const char **);
33 void efs_locate_inode(ino_t
, struct efs_sb
*, uint32_t *, int *);
34 int efs_read_inode(struct efs_mount
*, ino_t
, struct lwp
*,
36 void efs_dextent_to_extent(struct efs_dextent
*, struct efs_extent
*);
37 void efs_extent_to_dextent(struct efs_extent
*, struct efs_dextent
*);
38 int efs_inode_lookup(struct efs_mount
*, struct efs_inode
*,
39 struct componentname
*, ino_t
*);
40 int efs_bread(struct efs_mount
*, uint32_t, struct lwp
*, struct buf
**);
41 void efs_sync_inode_to_dinode(struct efs_inode
*);
42 void efs_sync_dinode_to_inode(struct efs_inode
*);
43 void efs_extent_iterator_init(struct efs_extent_iterator
*,
44 struct efs_inode
*, off_t
);
45 int efs_extent_iterator_next(struct efs_extent_iterator
*,
48 #endif /* !_FS_EFS_EFS_SUBR_H_ */