1#ifndef SQUASHFS_FS_SB
2#define SQUASHFS_FS_SB
3/*
4 * Squashfs
5 *
6 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
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
28struct squashfs_cache {
29	long long	block;
30	int		length;
31	long long	next_index;
32	char		*data;
33};
34
35struct squashfs_fragment_cache {
36	long long	block;
37	int		length;
38	unsigned int	locked;
39	char		*data;
40};
41
42struct 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	char			*read_page;
57	struct mutex		read_data_mutex;
58	struct mutex		read_page_mutex;
59	struct mutex		block_cache_mutex;
60	struct mutex		fragment_mutex;
61	struct mutex		meta_index_mutex;
62	wait_queue_head_t	waitq;
63	wait_queue_head_t	fragment_wait_queue;
64	struct meta_index	*meta_index;
65	long long		*inode_lookup_table;
66	int			(*read_inode)(struct inode *i,  squashfs_inode_t \
67				inode);
68	long long		(*read_blocklist)(struct inode *inode, int \
69				index, int readahead_blks, char *block_list, \
70				unsigned short **block_p, unsigned int *bsize);
71	int			(*read_fragment_index_table)(struct super_block *s);
72};
73#endif
74