Lines Matching refs:msblk

69 	struct squashfs_sb_info *msblk;  in squashfs_fill_super()  local
81 sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); in squashfs_fill_super()
86 msblk = sb->s_fs_info; in squashfs_fill_super()
88 msblk->stream.workspace = kmalloc(zlib_inflate_workspacesize(), in squashfs_fill_super()
90 if (msblk->stream.workspace == NULL) { in squashfs_fill_super()
101 msblk->devblksize = sb_min_blocksize(sb, BLOCK_SIZE); in squashfs_fill_super()
102 msblk->devblksize_log2 = ffz(~msblk->devblksize); in squashfs_fill_super()
104 mutex_init(&msblk->read_data_mutex); in squashfs_fill_super()
105 mutex_init(&msblk->meta_index_mutex); in squashfs_fill_super()
113 msblk->bytes_used = sizeof(*sblk); in squashfs_fill_super()
149 msblk->bytes_used = le64_to_cpu(sblk->bytes_used); in squashfs_fill_super()
150 if (msblk->bytes_used < 0 || msblk->bytes_used > in squashfs_fill_super()
155 msblk->block_size = le32_to_cpu(sblk->block_size); in squashfs_fill_super()
156 if (msblk->block_size > SQUASHFS_FILE_MAX_SIZE) in squashfs_fill_super()
159 msblk->block_log = le16_to_cpu(sblk->block_log); in squashfs_fill_super()
160 if (msblk->block_log > SQUASHFS_FILE_MAX_LOG) in squashfs_fill_super()
168 msblk->inode_table = le64_to_cpu(sblk->inode_table_start); in squashfs_fill_super()
169 msblk->directory_table = le64_to_cpu(sblk->directory_table_start); in squashfs_fill_super()
170 msblk->inodes = le32_to_cpu(sblk->inodes); in squashfs_fill_super()
178 TRACE("Filesystem size %lld bytes\n", msblk->bytes_used); in squashfs_fill_super()
179 TRACE("Block size %d\n", msblk->block_size); in squashfs_fill_super()
180 TRACE("Number of inodes %d\n", msblk->inodes); in squashfs_fill_super()
183 TRACE("sblk->inode_table_start %llx\n", msblk->inode_table); in squashfs_fill_super()
184 TRACE("sblk->directory_table_start %llx\n", msblk->directory_table); in squashfs_fill_super()
196 msblk->block_cache = squashfs_cache_init("metadata", in squashfs_fill_super()
198 if (msblk->block_cache == NULL) in squashfs_fill_super()
202 msblk->read_page = squashfs_cache_init("data", 1, msblk->block_size); in squashfs_fill_super()
203 if (msblk->read_page == NULL) { in squashfs_fill_super()
209 msblk->id_table = squashfs_read_id_index_table(sb, in squashfs_fill_super()
211 if (IS_ERR(msblk->id_table)) { in squashfs_fill_super()
212 err = PTR_ERR(msblk->id_table); in squashfs_fill_super()
213 msblk->id_table = NULL; in squashfs_fill_super()
221 msblk->fragment_cache = squashfs_cache_init("fragment", in squashfs_fill_super()
222 SQUASHFS_CACHED_FRAGMENTS, msblk->block_size); in squashfs_fill_super()
223 if (msblk->fragment_cache == NULL) { in squashfs_fill_super()
229 msblk->fragment_index = squashfs_read_fragment_index_table(sb, in squashfs_fill_super()
231 if (IS_ERR(msblk->fragment_index)) { in squashfs_fill_super()
232 err = PTR_ERR(msblk->fragment_index); in squashfs_fill_super()
233 msblk->fragment_index = NULL; in squashfs_fill_super()
243 msblk->inode_lookup_table = squashfs_read_inode_lookup_table(sb, in squashfs_fill_super()
244 lookup_table_start, msblk->inodes); in squashfs_fill_super()
245 if (IS_ERR(msblk->inode_lookup_table)) { in squashfs_fill_super()
246 err = PTR_ERR(msblk->inode_lookup_table); in squashfs_fill_super()
247 msblk->inode_lookup_table = NULL; in squashfs_fill_super()
280 squashfs_cache_delete(msblk->block_cache); in squashfs_fill_super()
281 squashfs_cache_delete(msblk->fragment_cache); in squashfs_fill_super()
282 squashfs_cache_delete(msblk->read_page); in squashfs_fill_super()
283 kfree(msblk->inode_lookup_table); in squashfs_fill_super()
284 kfree(msblk->fragment_index); in squashfs_fill_super()
285 kfree(msblk->id_table); in squashfs_fill_super()
286 kfree(msblk->stream.workspace); in squashfs_fill_super()
293 kfree(msblk->stream.workspace); in squashfs_fill_super()
302 struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info; in squashfs_statfs() local
307 buf->f_bsize = msblk->block_size; in squashfs_statfs()
308 buf->f_blocks = ((msblk->bytes_used - 1) >> msblk->block_log) + 1; in squashfs_statfs()
310 buf->f_files = msblk->inodes; in squashfs_statfs()