squashfs_fs_sb.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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@squashfs.org.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 curr_blk;
  30. int next_blk;
  31. int num_waiters;
  32. int unused;
  33. int block_size;
  34. int pages;
  35. spinlock_t lock;
  36. wait_queue_head_t wait_queue;
  37. struct squashfs_cache_entry *entry;
  38. };
  39. struct squashfs_cache_entry {
  40. u64 block;
  41. int length;
  42. int refcount;
  43. u64 next_index;
  44. int pending;
  45. int error;
  46. int num_waiters;
  47. wait_queue_head_t wait_queue;
  48. struct squashfs_cache *cache;
  49. void **data;
  50. struct squashfs_page_actor *actor;
  51. };
  52. struct squashfs_sb_info {
  53. const struct squashfs_decompressor *decompressor;
  54. int devblksize;
  55. int devblksize_log2;
  56. struct squashfs_cache *block_cache;
  57. struct squashfs_cache *fragment_cache;
  58. struct squashfs_cache *read_page;
  59. int next_meta_index;
  60. __le64 *id_table;
  61. __le64 *fragment_index;
  62. __le64 *xattr_id_table;
  63. struct mutex meta_index_mutex;
  64. struct meta_index *meta_index;
  65. struct squashfs_stream *stream;
  66. __le64 *inode_lookup_table;
  67. u64 inode_table;
  68. u64 directory_table;
  69. u64 xattr_table;
  70. unsigned int block_size;
  71. unsigned short block_log;
  72. long long bytes_used;
  73. unsigned int inodes;
  74. unsigned int fragments;
  75. int xattr_ids;
  76. };
  77. #endif