Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Squashfs - a compressed read only filesystem for Linux
0004  *
0005  * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
0006  * Phillip Lougher <phillip@squashfs.org.uk>
0007  *
0008  * squashfs.h
0009  */
0010 
0011 #define TRACE(s, args...)   pr_debug("SQUASHFS: "s, ## args)
0012 
0013 #define ERROR(s, args...)   pr_err("SQUASHFS error: "s, ## args)
0014 
0015 #define WARNING(s, args...) pr_warn("SQUASHFS: "s, ## args)
0016 
0017 /* block.c */
0018 extern int squashfs_read_data(struct super_block *, u64, int, u64 *,
0019                 struct squashfs_page_actor *);
0020 
0021 /* cache.c */
0022 extern struct squashfs_cache *squashfs_cache_init(char *, int, int);
0023 extern void squashfs_cache_delete(struct squashfs_cache *);
0024 extern struct squashfs_cache_entry *squashfs_cache_get(struct super_block *,
0025                 struct squashfs_cache *, u64, int);
0026 extern void squashfs_cache_put(struct squashfs_cache_entry *);
0027 extern int squashfs_copy_data(void *, struct squashfs_cache_entry *, int, int);
0028 extern int squashfs_read_metadata(struct super_block *, void *, u64 *,
0029                 int *, int);
0030 extern struct squashfs_cache_entry *squashfs_get_fragment(struct super_block *,
0031                 u64, int);
0032 extern struct squashfs_cache_entry *squashfs_get_datablock(struct super_block *,
0033                 u64, int);
0034 extern void *squashfs_read_table(struct super_block *, u64, int);
0035 
0036 /* decompressor.c */
0037 extern const struct squashfs_decompressor *squashfs_lookup_decompressor(int);
0038 extern void *squashfs_decompressor_setup(struct super_block *, unsigned short);
0039 
0040 /* decompressor_xxx.c */
0041 extern void *squashfs_decompressor_create(struct squashfs_sb_info *, void *);
0042 extern void squashfs_decompressor_destroy(struct squashfs_sb_info *);
0043 extern int squashfs_decompress(struct squashfs_sb_info *, struct bio *,
0044                 int, int, struct squashfs_page_actor *);
0045 extern int squashfs_max_decompressors(void);
0046 
0047 /* export.c */
0048 extern __le64 *squashfs_read_inode_lookup_table(struct super_block *, u64, u64,
0049                 unsigned int);
0050 
0051 /* fragment.c */
0052 extern int squashfs_frag_lookup(struct super_block *, unsigned int, u64 *);
0053 extern __le64 *squashfs_read_fragment_index_table(struct super_block *,
0054                 u64, u64, unsigned int);
0055 
0056 /* file.c */
0057 void squashfs_fill_page(struct page *, struct squashfs_cache_entry *, int, int);
0058 void squashfs_copy_cache(struct page *, struct squashfs_cache_entry *, int,
0059                 int);
0060 
0061 /* file_xxx.c */
0062 extern int squashfs_readpage_block(struct page *, u64, int, int);
0063 
0064 /* id.c */
0065 extern int squashfs_get_id(struct super_block *, unsigned int, unsigned int *);
0066 extern __le64 *squashfs_read_id_index_table(struct super_block *, u64, u64,
0067                 unsigned short);
0068 
0069 /* inode.c */
0070 extern struct inode *squashfs_iget(struct super_block *, long long,
0071                 unsigned int);
0072 extern int squashfs_read_inode(struct inode *, long long);
0073 
0074 /* xattr.c */
0075 extern ssize_t squashfs_listxattr(struct dentry *, char *, size_t);
0076 
0077 /*
0078  * Inodes, files,  decompressor and xattr operations
0079  */
0080 
0081 /* dir.c */
0082 extern const struct file_operations squashfs_dir_ops;
0083 
0084 /* export.c */
0085 extern const struct export_operations squashfs_export_ops;
0086 
0087 /* file.c */
0088 extern const struct address_space_operations squashfs_aops;
0089 
0090 /* inode.c */
0091 extern const struct inode_operations squashfs_inode_ops;
0092 
0093 /* namei.c */
0094 extern const struct inode_operations squashfs_dir_inode_ops;
0095 
0096 /* symlink.c */
0097 extern const struct address_space_operations squashfs_symlink_aops;
0098 extern const struct inode_operations squashfs_symlink_inode_ops;
0099 
0100 /* xattr.c */
0101 extern const struct xattr_handler *squashfs_xattr_handlers[];