6 * Copyright (c) 2002, 2003, 2004, 2005, 2006
7 * Phillip Lougher <phillip@lougher.org.uk>
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.
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.
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.
26 #include <linux/squashfs_fs.h>
28 struct squashfs_cache
{
35 struct squashfs_fragment_cache
{
42 struct squashfs_sb_info
{
43 struct squashfs_super_block sblk
;
47 struct squashfs_cache
*block_cache
;
48 struct squashfs_fragment_cache
*fragment
;
54 long long *fragment_index
;
55 unsigned int *fragment_index_2
;
56 unsigned int read_size
;
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 struct inode
*(*iget
)(struct super_block
*s
, squashfs_inode_t \
69 long long (*read_blocklist
)(struct inode
*inode
, int \
70 index
, int readahead_blks
, char *block_list
, \
71 unsigned short **block_p
, unsigned int *bsize
);
72 int (*read_fragment_index_table
)(struct super_block
*s
);