Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / include / linux / squashfs_fs_sb.h
1 #ifndef SQUASHFS_FS_SB
2 #define SQUASHFS_FS_SB
3 /*
4  * Squashfs
5  *
6  * Copyright (c) 2002, 2003, 2004, 2005, 2006
7  * Phillip Lougher <phillip@lougher.org.uk>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2,
12  * or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * squashfs_fs_sb.h
24  */
25
26 #include <linux/squashfs_fs.h>
27
28 struct squashfs_cache {
29         long long       block;
30         int             length;
31         long long       next_index;
32         char            *data;
33 };
34
35 struct squashfs_fragment_cache {
36         long long       block;
37         int             length;
38         unsigned int    locked;
39         char            *data;
40 };
41
42 struct squashfs_sb_info {
43         struct squashfs_super_block     sblk;
44         int                     devblksize;
45         int                     devblksize_log2;
46         int                     swap;
47         struct squashfs_cache   *block_cache;
48         struct squashfs_fragment_cache  *fragment;
49         int                     next_cache;
50         int                     next_fragment;
51         int                     next_meta_index;
52         unsigned int            *uid;
53         unsigned int            *guid;
54         long long               *fragment_index;
55         unsigned int            *fragment_index_2;
56         unsigned int            read_size;
57         char                    *read_data;
58         char                    *read_page;
59         struct semaphore        read_data_mutex;
60         struct semaphore        read_page_mutex;
61         struct semaphore        block_cache_mutex;
62         struct semaphore        fragment_mutex;
63         struct semaphore        meta_index_mutex;
64         wait_queue_head_t       waitq;
65         wait_queue_head_t       fragment_wait_queue;
66         struct meta_index       *meta_index;
67         z_stream                stream;
68         struct inode            *(*iget)(struct super_block *s,  squashfs_inode_t \
69                                 inode);
70         long long               (*read_blocklist)(struct inode *inode, int \
71                                 index, int readahead_blks, char *block_list, \
72                                 unsigned short **block_p, unsigned int *bsize);
73         int                     (*read_fragment_index_table)(struct super_block *s);
74 };
75 #endif