Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 #ifndef SQUASHFS_FS_SB
0003 #define SQUASHFS_FS_SB
0004 /*
0005  * Squashfs
0006  *
0007  * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
0008  * Phillip Lougher <phillip@squashfs.org.uk>
0009  *
0010  * squashfs_fs_sb.h
0011  */
0012 
0013 #include "squashfs_fs.h"
0014 
0015 struct squashfs_cache {
0016     char            *name;
0017     int         entries;
0018     int         curr_blk;
0019     int         next_blk;
0020     int         num_waiters;
0021     int         unused;
0022     int         block_size;
0023     int         pages;
0024     spinlock_t      lock;
0025     wait_queue_head_t   wait_queue;
0026     struct squashfs_cache_entry *entry;
0027 };
0028 
0029 struct squashfs_cache_entry {
0030     u64         block;
0031     int         length;
0032     int         refcount;
0033     u64         next_index;
0034     int         pending;
0035     int         error;
0036     int         num_waiters;
0037     wait_queue_head_t   wait_queue;
0038     struct squashfs_cache   *cache;
0039     void            **data;
0040     struct squashfs_page_actor  *actor;
0041 };
0042 
0043 struct squashfs_sb_info {
0044     const struct squashfs_decompressor  *decompressor;
0045     int                 devblksize;
0046     int                 devblksize_log2;
0047     struct squashfs_cache           *block_cache;
0048     struct squashfs_cache           *fragment_cache;
0049     struct squashfs_cache           *read_page;
0050     int                 next_meta_index;
0051     __le64                  *id_table;
0052     __le64                  *fragment_index;
0053     __le64                  *xattr_id_table;
0054     struct mutex                meta_index_mutex;
0055     struct meta_index           *meta_index;
0056     struct squashfs_stream          *stream;
0057     __le64                  *inode_lookup_table;
0058     u64                 inode_table;
0059     u64                 directory_table;
0060     u64                 xattr_table;
0061     unsigned int                block_size;
0062     unsigned short              block_log;
0063     long long               bytes_used;
0064     unsigned int                inodes;
0065     unsigned int                fragments;
0066     int                 xattr_ids;
0067     unsigned int                ids;
0068     bool                    panic_on_errors;
0069 };
0070 #endif