http://downloads.netgear.com/files/GPL/DM111PSP_v3.61d_GPL.tar.gz
[bcm963xx.git] / hostTools / squashfs / squashfs_fs_sb.h
1 #ifndef SQUASHFS_FS_SB
2 #define SQUASHFS_FS_SB
3 /*
4  * Squashfs
5  *
6  * Copyright (c) 2002, 2003, 2004 Phillip Lougher <plougher@users.sourceforge.net>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2,
11  * or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  * squashfs_fs_sb.h
23  */
24
25 #include <linux/squashfs_fs.h>
26
27 typedef struct {
28         unsigned int    block;
29         int             length;
30         unsigned int    next_index;
31         char            *data;
32         } squashfs_cache;
33
34 struct squashfs_fragment_cache {
35         unsigned int    block;
36         int             length;
37         unsigned int    locked;
38         char            *data;
39         };
40
41 typedef struct squashfs_sb_info {
42         squashfs_super_block    sBlk;
43         int                     devblksize;
44         int                     devblksize_log2;
45         int                     swap;
46         squashfs_cache          *block_cache;
47         struct squashfs_fragment_cache  *fragment;
48         int                     next_cache;
49         int                     next_fragment;
50         squashfs_uid            *uid;
51         squashfs_uid            *guid;
52         squashfs_fragment_index         *fragment_index;
53         unsigned int            read_size;
54         char                    *read_data;
55         char                    *read_page;
56         struct semaphore        read_page_mutex;
57         struct semaphore        block_cache_mutex;
58         struct semaphore        fragment_mutex;
59         wait_queue_head_t       waitq;
60         wait_queue_head_t       fragment_wait_queue;
61         struct inode            *(*iget)(struct super_block *s, squashfs_inode inode);
62         unsigned int            (*read_blocklist)(struct inode *inode, int index, int readahead_blks,
63                                         char *block_list, char **block_p, unsigned int *bsize);
64         } squashfs_sb_info;
65 #endif