squashfs_fs_sb.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef SQUASHFS_FS_SB
  2. #define SQUASHFS_FS_SB
  3. /*
  4. * Squashfs
  5. *
  6. * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
  7. * Phillip Lougher <phillip@lougher.demon.co.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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. *
  23. * squashfs_fs_sb.h
  24. */
  25. #include "squashfs_fs.h"
  26. struct squashfs_cache {
  27. char *name;
  28. int entries;
  29. int next_blk;
  30. int num_waiters;
  31. int unused;
  32. int block_size;
  33. int pages;
  34. spinlock_t lock;
  35. wait_queue_head_t wait_queue;
  36. struct squashfs_cache_entry *entry;
  37. };
  38. struct squashfs_cache_entry {
  39. u64 block;
  40. int length;
  41. int refcount;
  42. u64 next_index;
  43. int pending;
  44. int error;
  45. int num_waiters;
  46. wait_queue_head_t wait_queue;
  47. struct squashfs_cache *cache;
  48. void **data;
  49. };
  50. struct squashfs_sb_info {
  51. int devblksize;
  52. int devblksize_log2;
  53. struct squashfs_cache *block_cache;
  54. struct squashfs_cache *fragment_cache;
  55. struct squashfs_cache *read_page;
  56. int next_meta_index;
  57. __le64 *id_table;
  58. __le64 *fragment_index;
  59. unsigned int *fragment_index_2;
  60. struct mutex read_data_mutex;
  61. struct mutex meta_index_mutex;
  62. struct meta_index *meta_index;
  63. z_stream stream;
  64. __le64 *inode_lookup_table;
  65. u64 inode_table;
  66. u64 directory_table;
  67. unsigned int block_size;
  68. unsigned short block_log;
  69. long long bytes_used;
  70. unsigned int inodes;
  71. };
  72. #endif