Home | History | Annotate | Download | only in ext2fs
      1 /*
      2  * ext2fsP.h --- private header file for ext2 library
      3  *
      4  * Copyright (C) 1997 Theodore Ts'o.
      5  *
      6  * %Begin-Header%
      7  * This file may be redistributed under the terms of the GNU Library
      8  * General Public License, version 2.
      9  * %End-Header%
     10  */
     11 
     12 #include "ext2fs.h"
     13 
     14 /*
     15  * Badblocks list
     16  */
     17 struct ext2_struct_u32_list {
     18 	int	magic;
     19 	int	num;
     20 	int	size;
     21 	__u32	*list;
     22 	int	badblocks_flags;
     23 };
     24 
     25 struct ext2_struct_u32_iterate {
     26 	int			magic;
     27 	ext2_u32_list		bb;
     28 	int			ptr;
     29 };
     30 
     31 
     32 /*
     33  * Directory block iterator definition
     34  */
     35 struct ext2_struct_dblist {
     36 	int			magic;
     37 	ext2_filsys		fs;
     38 	ext2_ino_t		size;
     39 	ext2_ino_t		count;
     40 	int			sorted;
     41 	struct ext2_db_entry *	list;
     42 };
     43 
     44 /*
     45  * For directory iterators
     46  */
     47 struct dir_context {
     48 	ext2_ino_t		dir;
     49 	int		flags;
     50 	char		*buf;
     51 	int (*func)(ext2_ino_t	dir,
     52 		    int	entry,
     53 		    struct ext2_dir_entry *dirent,
     54 		    int	offset,
     55 		    int	blocksize,
     56 		    char	*buf,
     57 		    void	*priv_data);
     58 	void		*priv_data;
     59 	errcode_t	errcode;
     60 };
     61 
     62 /*
     63  * Inode cache structure
     64  */
     65 struct ext2_inode_cache {
     66 	void *				buffer;
     67 	blk_t				buffer_blk;
     68 	int				cache_last;
     69 	int				cache_size;
     70 	int				refcount;
     71 	struct ext2_inode_cache_ent	*cache;
     72 };
     73 
     74 struct ext2_inode_cache_ent {
     75 	ext2_ino_t		ino;
     76 	struct ext2_inode	inode;
     77 };
     78 
     79 /* Function prototypes */
     80 
     81 extern int ext2fs_process_dir_block(ext2_filsys  	fs,
     82 				    blk_t		*blocknr,
     83 				    e2_blkcnt_t		blockcnt,
     84 				    blk_t		ref_block,
     85 				    int			ref_offset,
     86 				    void		*priv_data);
     87 
     88 
     89