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