Ignore:
Timestamp:
Mar 12, 2017, 3:18:59 PM (3 months ago)
Author:
brainslayer
Message:

new fs is compatible with standard squashfs, just smaller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/fs/squashfs/squashfs.h

    r31574 r31630  
    22 * Squashfs - a compressed read only filesystem for Linux
    33 *
    4  * Copyright (c) 2002, 2003, 2004, 2005, 2006
    5  * Phillip Lougher <phillip@lougher.org.uk>
     4 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
     5 * Phillip Lougher <phillip@squashfs.org.uk>
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    1717 * You should have received a copy of the GNU General Public License
    1818 * along with this program; if not, write to the Free Software
    19  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     19 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    2020 *
    2121 * squashfs.h
    2222 */
    2323
    24 #ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
    25 #undef CONFIG_SQUASHFS_1_0_COMPATIBILITY
    26 #endif
    27 #ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
    28 #undef CONFIG_SQUASHFS_2_0_COMPATIBILITY
    29 #endif
    30 
    31 #ifdef SQUASHFS_TRACE
    3224#define TRACE(s, args...)       pr_debug("SQUASHFS: "s, ## args)
    33 #else
    34 #define TRACE(s, args...)       {}
    35 #endif
    3625
    3726#define ERROR(s, args...)       pr_err("SQUASHFS error: "s, ## args)
    3827
    39 #define SERROR(s, args...)      do { \
    40                                 if (!silent) \
    41                                 printk(KERN_ERR "SQUASHFS error: "s, ## args);\
    42                                 } while(0)
    43 
    4428#define WARNING(s, args...)     pr_warn("SQUASHFS: "s, ## args)
    4529
    46 static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
    47 {
    48         return list_entry(inode, struct squashfs_inode_info, vfs_inode);
    49 }
     30/* block.c */
     31extern int squashfs_read_data(struct super_block *, u64, int, u64 *,
     32                                struct squashfs_page_actor *);
    5033
    51 #if defined(CONFIG_SQUASHFS_1_0_COMPATIBILITY ) || defined(CONFIG_SQUASHFS_2_0_COMPATIBILITY)
    52 #define SQSH_EXTERN
    53 extern unsigned int squashfs_read_data(struct super_block *s, char *buffer,
    54                                 long long index, unsigned int length,
    55                                 long long *next_index);
    56 extern int squashfs_get_cached_block(struct super_block *s, char *buffer,
    57                                 long long block, unsigned int offset,
    58                                 int length, long long *next_block,
    59                                 unsigned int *next_offset);
    60 extern void release_cached_fragment(struct squashfs_sb_info *msblk, struct
    61                                         squashfs_fragment_cache *fragment);
    62 extern struct squashfs_fragment_cache *get_cached_fragment(struct super_block
    63                                         *s, long long start_block,
    64                                         int length);
    65 extern struct address_space_operations squashfs_symlink_aops;
    66 extern struct address_space_operations squashfs_aops;
    67 extern struct address_space_operations squashfs_aops_4K;
    68 extern struct inode_operations squashfs_dir_inode_ops;
    69 #else
    70 #define SQSH_EXTERN static
    71 #endif
     34/* cache.c */
     35extern struct squashfs_cache *squashfs_cache_init(char *, int, int);
     36extern void squashfs_cache_delete(struct squashfs_cache *);
     37extern struct squashfs_cache_entry *squashfs_cache_get(struct super_block *,
     38                                struct squashfs_cache *, u64, int);
     39extern void squashfs_cache_put(struct squashfs_cache_entry *);
     40extern int squashfs_copy_data(void *, struct squashfs_cache_entry *, int, int);
     41extern int squashfs_read_metadata(struct super_block *, void *, u64 *,
     42                                int *, int);
     43extern struct squashfs_cache_entry *squashfs_get_fragment(struct super_block *,
     44                                u64, int);
     45extern struct squashfs_cache_entry *squashfs_get_datablock(struct super_block *,
     46                                u64, int);
     47extern void *squashfs_read_table(struct super_block *, u64, int);
    7248
    73 #ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
    74 extern int squashfs_1_0_supported(struct squashfs_sb_info *msblk);
    75 #else
    76 static inline int squashfs_1_0_supported(struct squashfs_sb_info *msblk)
    77 {
    78         return 0;
    79 }
    80 #endif
     49/* decompressor.c */
     50extern const struct squashfs_decompressor *squashfs_lookup_decompressor(int);
     51extern void *squashfs_decompressor_setup(struct super_block *, unsigned short);
    8152
    82 #ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
    83 extern int squashfs_2_0_supported(struct squashfs_sb_info *msblk);
    84 #else
    85 static inline int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
    86 {
    87         return 0;
    88 }
    89 #endif
     53/* decompressor_xxx.c */
     54extern void *squashfs_decompressor_create(struct squashfs_sb_info *, void *);
     55extern void squashfs_decompressor_destroy(struct squashfs_sb_info *);
     56extern int squashfs_decompress(struct squashfs_sb_info *, struct buffer_head **,
     57        int, int, int, struct squashfs_page_actor *);
     58extern int squashfs_max_decompressors(void);
     59
     60/* export.c */
     61extern __le64 *squashfs_read_inode_lookup_table(struct super_block *, u64, u64,
     62                                unsigned int);
     63
     64/* fragment.c */
     65extern int squashfs_frag_lookup(struct super_block *, unsigned int, u64 *);
     66extern __le64 *squashfs_read_fragment_index_table(struct super_block *,
     67                                u64, u64, unsigned int);
     68
     69/* file.c */
     70void squashfs_copy_cache(struct page *, struct squashfs_cache_entry *, int,
     71                                int);
     72
     73/* file_xxx.c */
     74extern int squashfs_readpage_block(struct page *, u64, int);
     75
     76/* id.c */
     77extern int squashfs_get_id(struct super_block *, unsigned int, unsigned int *);
     78extern __le64 *squashfs_read_id_index_table(struct super_block *, u64, u64,
     79                                unsigned short);
     80
     81/* inode.c */
     82extern struct inode *squashfs_iget(struct super_block *, long long,
     83                                unsigned int);
     84extern int squashfs_read_inode(struct inode *, long long);
     85
     86/* xattr.c */
     87extern ssize_t squashfs_listxattr(struct dentry *, char *, size_t);
     88
     89/*
     90 * Inodes, files,  decompressor and xattr operations
     91 */
     92
     93/* dir.c */
     94extern const struct file_operations squashfs_dir_ops;
     95
     96/* export.c */
     97extern const struct export_operations squashfs_export_ops;
     98
     99/* file.c */
     100extern const struct address_space_operations squashfs_aops;
     101
     102/* inode.c */
     103extern const struct inode_operations squashfs_inode_ops;
     104
     105/* namei.c */
     106extern const struct inode_operations squashfs_dir_inode_ops;
     107
     108/* symlink.c */
     109extern const struct address_space_operations squashfs_symlink_aops;
     110extern const struct inode_operations squashfs_symlink_inode_ops;
     111
     112/* xattr.c */
     113extern const struct xattr_handler *squashfs_xattr_handlers[];
Note: See TracChangeset for help on using the changeset viewer.