Phillip Lougher | ffae2cd | 2009-01-05 08:46:27 +0000 | [diff] [blame] | 1 | #ifndef SQUASHFS_FS_SB |
| 2 | #define SQUASHFS_FS_SB |
| 3 | /* |
| 4 | * Squashfs |
| 5 | * |
| 6 | * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
Phillip Lougher | d7f2ff6 | 2011-05-26 10:39:56 +0100 | [diff] [blame] | 7 | * Phillip Lougher <phillip@squashfs.org.uk> |
Phillip Lougher | ffae2cd | 2009-01-05 08:46:27 +0000 | [diff] [blame] | 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 22 | * |
| 23 | * squashfs_fs_sb.h |
| 24 | */ |
| 25 | |
| 26 | #include "squashfs_fs.h" |
| 27 | |
| 28 | struct squashfs_cache { |
| 29 | char *name; |
| 30 | int entries; |
Ajeet Yadav | d7fbd89 | 2011-12-27 15:10:04 +0530 | [diff] [blame] | 31 | int curr_blk; |
Phillip Lougher | ffae2cd | 2009-01-05 08:46:27 +0000 | [diff] [blame] | 32 | int next_blk; |
| 33 | int num_waiters; |
| 34 | int unused; |
| 35 | int block_size; |
| 36 | int pages; |
| 37 | spinlock_t lock; |
| 38 | wait_queue_head_t wait_queue; |
| 39 | struct squashfs_cache_entry *entry; |
| 40 | }; |
| 41 | |
| 42 | struct squashfs_cache_entry { |
| 43 | u64 block; |
| 44 | int length; |
| 45 | int refcount; |
| 46 | u64 next_index; |
| 47 | int pending; |
| 48 | int error; |
| 49 | int num_waiters; |
| 50 | wait_queue_head_t wait_queue; |
| 51 | struct squashfs_cache *cache; |
| 52 | void **data; |
Phillip Lougher | 846b730 | 2013-11-18 02:59:12 +0000 | [diff] [blame] | 53 | struct squashfs_page_actor *actor; |
Phillip Lougher | ffae2cd | 2009-01-05 08:46:27 +0000 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | struct squashfs_sb_info { |
Phillip Lougher | 4c0f0bb | 2009-10-06 04:04:15 +0100 | [diff] [blame] | 57 | const struct squashfs_decompressor *decompressor; |
| 58 | int devblksize; |
| 59 | int devblksize_log2; |
| 60 | struct squashfs_cache *block_cache; |
| 61 | struct squashfs_cache *fragment_cache; |
| 62 | struct squashfs_cache *read_page; |
| 63 | int next_meta_index; |
| 64 | __le64 *id_table; |
| 65 | __le64 *fragment_index; |
Phillip Lougher | 4b5397d | 2010-05-14 20:48:47 +0100 | [diff] [blame] | 66 | __le64 *xattr_id_table; |
Phillip Lougher | 4c0f0bb | 2009-10-06 04:04:15 +0100 | [diff] [blame] | 67 | struct mutex meta_index_mutex; |
| 68 | struct meta_index *meta_index; |
Phillip Lougher | 9508c6b | 2013-11-13 02:56:26 +0000 | [diff] [blame] | 69 | struct squashfs_stream *stream; |
Phillip Lougher | 4c0f0bb | 2009-10-06 04:04:15 +0100 | [diff] [blame] | 70 | __le64 *inode_lookup_table; |
| 71 | u64 inode_table; |
| 72 | u64 directory_table; |
Phillip Lougher | 4b5397d | 2010-05-14 20:48:47 +0100 | [diff] [blame] | 73 | u64 xattr_table; |
Phillip Lougher | 4c0f0bb | 2009-10-06 04:04:15 +0100 | [diff] [blame] | 74 | unsigned int block_size; |
| 75 | unsigned short block_log; |
| 76 | long long bytes_used; |
| 77 | unsigned int inodes; |
Phillip Lougher | 4b5397d | 2010-05-14 20:48:47 +0100 | [diff] [blame] | 78 | int xattr_ids; |
Phillip Lougher | ffae2cd | 2009-01-05 08:46:27 +0000 | [diff] [blame] | 79 | }; |
| 80 | #endif |