squashfs_fs_sb.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 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. const struct squashfs_decompressor *decompressor;
  52. int devblksize;
  53. int devblksize_log2;
  54. struct squashfs_cache *block_cache;
  55. struct squashfs_cache *fragment_cache;
  56. struct squashfs_cache *read_page;
  57. int next_meta_index;
  58. __le64 *id_table;
  59. __le64 *fragment_index;
  60. __le64 *xattr_id_table;
  61. struct mutex read_data_mutex;
  62. struct mutex meta_index_mutex;
  63. struct meta_index *meta_index;
  64. void *stream;
  65. __le64 *inode_lookup_table;
  66. u64 inode_table;
  67. u64 directory_table;
  68. u64 xattr_table;
  69. unsigned int block_size;
  70. unsigned short block_log;
  71. long long bytes_used;
  72. unsigned int inodes;
  73. int xattr_ids;
  74. };
  75. #endif