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