MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / linux / squashfs_fs_sb.h
blob615a8cee2ed6672b5ebc1f24f76c49692cd47706
1 #ifndef SQUASHFS_FS_SB
2 #define SQUASHFS_FS_SB
3 /*
4 * Squashfs
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.
22 * squashfs_fs_sb.h
25 #include <linux/squashfs_fs.h>
27 typedef struct {
28 unsigned int block;
29 int length;
30 unsigned int next_index;
31 char *data;
32 } squashfs_cache;
34 struct squashfs_fragment_cache {
35 unsigned int block;
36 int length;
37 unsigned int locked;
38 char *data;
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, unsigned short **block_p, unsigned int *bsize);
64 } squashfs_sb_info;
65 #endif