squashfs_fs_sb.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifndef SQUASHFS_FS_SB
  3. #define SQUASHFS_FS_SB
  4. /*
  5. * Squashfs
  6. *
  7. * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
  8. * Phillip Lougher <phillip@squashfs.org.uk>
  9. *
  10. * squashfs_fs_sb.h
  11. */
  12. #include "squashfs_fs.h"
  13. struct squashfs_cache {
  14. char *name;
  15. int entries;
  16. int curr_blk;
  17. int next_blk;
  18. int num_waiters;
  19. int unused;
  20. int block_size;
  21. int pages;
  22. spinlock_t lock;
  23. wait_queue_head_t wait_queue;
  24. struct squashfs_cache_entry *entry;
  25. };
  26. struct squashfs_cache_entry {
  27. u64 block;
  28. int length;
  29. int refcount;
  30. u64 next_index;
  31. int pending;
  32. int error;
  33. int num_waiters;
  34. wait_queue_head_t wait_queue;
  35. struct squashfs_cache *cache;
  36. void **data;
  37. struct squashfs_page_actor *actor;
  38. };
  39. struct squashfs_sb_info {
  40. const struct squashfs_decompressor *decompressor;
  41. int devblksize;
  42. int devblksize_log2;
  43. struct squashfs_cache *block_cache;
  44. struct squashfs_cache *fragment_cache;
  45. struct squashfs_cache *read_page;
  46. int next_meta_index;
  47. __le64 *id_table;
  48. __le64 *fragment_index;
  49. __le64 *xattr_id_table;
  50. struct mutex meta_index_mutex;
  51. struct meta_index *meta_index;
  52. struct squashfs_stream *stream;
  53. __le64 *inode_lookup_table;
  54. u64 inode_table;
  55. u64 directory_table;
  56. u64 xattr_table;
  57. unsigned int block_size;
  58. unsigned short block_log;
  59. long long bytes_used;
  60. unsigned int inodes;
  61. unsigned int fragments;
  62. int xattr_ids;
  63. unsigned int ids;
  64. };
  65. #endif