6 * Copyright (c) 2002, 2003, 2004, 2005 Phillip Lougher <phillip@lougher.demon.co.uk>
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.
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.
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.
25 #include <linux/squashfs_fs.h>
30 unsigned int next_index;
34 struct squashfs_fragment_cache {
41 typedef struct squashfs_sb_info {
42 squashfs_super_block sBlk;
46 squashfs_cache *block_cache;
47 struct squashfs_fragment_cache *fragment;
52 squashfs_fragment_index *fragment_index;
53 unsigned int read_size;
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, unsigned short **block_p, unsigned int *bsize);