squashfs.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Squashfs - a compressed read only filesystem for Linux
  4. *
  5. * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
  6. * Phillip Lougher <[email protected]>
  7. *
  8. * squashfs.h
  9. */
  10. #define TRACE(s, args...) pr_debug("SQUASHFS: "s, ## args)
  11. #define ERROR(s, args...) pr_err("SQUASHFS error: "s, ## args)
  12. #define WARNING(s, args...) pr_warn("SQUASHFS: "s, ## args)
  13. /* block.c */
  14. extern int squashfs_read_data(struct super_block *, u64, int, u64 *,
  15. struct squashfs_page_actor *);
  16. /* cache.c */
  17. extern struct squashfs_cache *squashfs_cache_init(char *, int, int);
  18. extern void squashfs_cache_delete(struct squashfs_cache *);
  19. extern struct squashfs_cache_entry *squashfs_cache_get(struct super_block *,
  20. struct squashfs_cache *, u64, int);
  21. extern void squashfs_cache_put(struct squashfs_cache_entry *);
  22. extern int squashfs_copy_data(void *, struct squashfs_cache_entry *, int, int);
  23. extern int squashfs_read_metadata(struct super_block *, void *, u64 *,
  24. int *, int);
  25. extern struct squashfs_cache_entry *squashfs_get_fragment(struct super_block *,
  26. u64, int);
  27. extern struct squashfs_cache_entry *squashfs_get_datablock(struct super_block *,
  28. u64, int);
  29. extern void *squashfs_read_table(struct super_block *, u64, int);
  30. /* decompressor.c */
  31. extern const struct squashfs_decompressor *squashfs_lookup_decompressor(int);
  32. extern void *squashfs_decompressor_setup(struct super_block *, unsigned short);
  33. /* decompressor_xxx.c */
  34. extern void *squashfs_decompressor_create(struct squashfs_sb_info *, void *);
  35. extern void squashfs_decompressor_destroy(struct squashfs_sb_info *);
  36. extern int squashfs_decompress(struct squashfs_sb_info *, struct bio *,
  37. int, int, struct squashfs_page_actor *);
  38. extern int squashfs_max_decompressors(void);
  39. /* export.c */
  40. extern __le64 *squashfs_read_inode_lookup_table(struct super_block *, u64, u64,
  41. unsigned int);
  42. /* fragment.c */
  43. extern int squashfs_frag_lookup(struct super_block *, unsigned int, u64 *);
  44. extern __le64 *squashfs_read_fragment_index_table(struct super_block *,
  45. u64, u64, unsigned int);
  46. /* file.c */
  47. void squashfs_fill_page(struct page *, struct squashfs_cache_entry *, int, int);
  48. void squashfs_copy_cache(struct page *, struct squashfs_cache_entry *, int,
  49. int);
  50. /* file_xxx.c */
  51. extern int squashfs_readpage_block(struct page *, u64, int, int);
  52. /* id.c */
  53. extern int squashfs_get_id(struct super_block *, unsigned int, unsigned int *);
  54. extern __le64 *squashfs_read_id_index_table(struct super_block *, u64, u64,
  55. unsigned short);
  56. /* inode.c */
  57. extern struct inode *squashfs_iget(struct super_block *, long long,
  58. unsigned int);
  59. extern int squashfs_read_inode(struct inode *, long long);
  60. /* xattr.c */
  61. extern ssize_t squashfs_listxattr(struct dentry *, char *, size_t);
  62. /*
  63. * Inodes, files, decompressor and xattr operations
  64. */
  65. /* dir.c */
  66. extern const struct file_operations squashfs_dir_ops;
  67. /* export.c */
  68. extern const struct export_operations squashfs_export_ops;
  69. /* file.c */
  70. extern const struct address_space_operations squashfs_aops;
  71. /* inode.c */
  72. extern const struct inode_operations squashfs_inode_ops;
  73. /* namei.c */
  74. extern const struct inode_operations squashfs_dir_inode_ops;
  75. /* symlink.c */
  76. extern const struct address_space_operations squashfs_symlink_aops;
  77. extern const struct inode_operations squashfs_symlink_inode_ops;
  78. /* xattr.c */
  79. extern const struct xattr_handler *squashfs_xattr_handlers[];